Browse Source

make GetTime available to user of library

pull/420/head
user 7 years ago
parent
commit
48d0c93ace
2 changed files with 5 additions and 2 deletions
  1. +2
    -2
      src/core.c
  2. +3
    -0
      src/raylib.h

+ 2
- 2
src/core.c View File

@ -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();

+ 3
- 0
src/raylib.h View File

@ -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

Loading…
Cancel
Save