diff options
| author | user <email> | 2017-12-14 11:50:35 +0100 |
|---|---|---|
| committer | user <email> | 2017-12-14 11:50:35 +0100 |
| commit | 48d0c93ace63225231d56f6a7aaa058218622578 (patch) | |
| tree | d2567056e49008d5e86118856c7388d01ecc3aaf /src | |
| parent | b872de951b0c1a830e3452ede6fbdd471df0d025 (diff) | |
| download | raylib-48d0c93ace63225231d56f6a7aaa058218622578.tar.gz raylib-48d0c93ace63225231d56f6a7aaa058218622578.zip | |
make GetTime available to user of library
Diffstat (limited to 'src')
| -rw-r--r-- | src/core.c | 4 | ||||
| -rw-r--r-- | src/raylib.h | 3 |
2 files changed, 5 insertions, 2 deletions
@@ -352,7 +352,7 @@ extern void UnloadDefaultFont(void); // [Module: text] Unloads default fo static void InitGraphicsDevice(int width, int height); // Initialize graphics device static void SetupFramebufferSize(int displayWidth, int displayHeight); static void InitTimer(void); // Initialize timer -static double GetTime(void); // Returns time since InitTimer() was run + double GetTime(void); // Returns time since InitTimer() was run static void Wait(float ms); // Wait for some milliseconds (stop program execution) static bool GetKeyStatus(int key); // Returns if a key has been pressed static bool GetMouseButtonStatus(int button); // Returns if a mouse button has been pressed @@ -2120,7 +2120,7 @@ static void InitTimer(void) } // Get current time measure (in seconds) since InitTimer() -static double GetTime(void) +double GetTime(void) { #if defined(PLATFORM_DESKTOP) || defined(PLATFORM_WEB) return glfwGetTime(); diff --git a/src/raylib.h b/src/raylib.h index 9af21872..0a9eab46 100644 --- a/src/raylib.h +++ b/src/raylib.h @@ -723,6 +723,9 @@ RLAPI void SetTargetFPS(int fps); // Set target RLAPI int GetFPS(void); // Returns current FPS RLAPI float GetFrameTime(void); // Returns time in seconds for last frame drawn +RLAPI double GetTime(void); // Return time in seconds + + // Color-related functions RLAPI int GetHexValue(Color color); // Returns hexadecimal value for a Color RLAPI Color GetColor(int hexValue); // Returns a Color struct from hexadecimal value |
