2023-01-08 07:41:54 +00:00
|
|
|
#ifndef INCLUDE_LIBQB_DATETIME_H
|
|
|
|
#define INCLUDE_LIBQB_DATETIME_H
|
|
|
|
|
2024-02-13 06:07:07 +00:00
|
|
|
#include <stdint.h>
|
|
|
|
#include "qbs.h"
|
|
|
|
|
2024-03-11 16:53:42 +00:00
|
|
|
#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
|
|
|
|
|
2023-01-08 07:41:54 +00:00
|
|
|
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
|
|
|
|
|
2024-02-13 06:07:07 +00:00
|
|
|
qbs *func_time();
|
|
|
|
void sub_time(qbs *str);
|
|
|
|
|
|
|
|
qbs *func_date();
|
|
|
|
void sub_date(qbs *date);
|
|
|
|
|
2023-01-08 07:41:54 +00:00
|
|
|
#endif
|