1
1
Fork 0
mirror of https://github.com/QB64-Phoenix-Edition/QB64pe.git synced 2024-05-12 12:00:13 +00:00
QB64-PE/internal/c/libqb/include/datetime.h
Matthew Kilgore 786f40193b Make Linux GetTicks() start from zero
Since the GetTicks() is visible in the logging, it's useful
to have it start from zero rather than an arbitrary number.
2024-04-17 00:58:30 -04:00

33 lines
684 B
C

#ifndef INCLUDE_LIBQB_DATETIME_H
#define INCLUDE_LIBQB_DATETIME_H
#include <stdint.h>
#include "qbs.h"
#ifdef QB64_LINUX
// Initializes the clock returned by 'GetTicks()' so that it starts from zero
// Should be called at the very beginning of the program
void clock_init();
#else
static inline void clock_init() { }
#endif
int64_t GetTicks();
double func_timer(double accuracy, int32_t passed);
void sub__delay(double seconds);
void sub__limit(double fps);
// We provide a 'Sleep()' function for non-Windows platforms
#ifndef QB64_WINDOWS
void Sleep(uint32_t milliseconds);
#endif
qbs *func_time();
void sub_time(qbs *str);
qbs *func_date();
void sub_date(qbs *date);
#endif