1
1
Fork 0
mirror of https://github.com/QB64-Phoenix-Edition/QB64pe.git synced 2024-09-16 15:34:03 +00:00
QB64-PE/tests/compile_tests
Matthew Kilgore f21ce09e2d Replace time() with std::chrono, fix startup delay
Currently main() includes logic that is intended to sync time() with
GetTicks() for the purpose of using GetTicks() to get millisecond
accuracy with time(), which only has second accuracy. Unfortunately, the
'syncing' up of these time sources results in an average of a half
second delay in starting a QB64-PE program.

This logic is easly replaced with std::chrono, which provides a real
time clock which is also millisecond accurate. That removes the need to
use time() and GetTicks() together to get millisecond accuracy, and
means the delay syncing them is no longer necessary.

I also separated most of the "delay" and "time" related functions into
datetime.cpp, and included the new std::chrono code into that file.

Since I needed to call some of the rounding functions in datetime.cpp I
also moved that stuff out into its own .cpp and header files to clean
things up a bit.

Fixes: #282
2023-01-08 20:24:25 -05:00
..
audio_handle_test Add tests for SOUND and PLAY "MB" 2022-09-17 03:06:24 -04:00
audio_mem_test Fix all test failures 2023-01-06 18:31:27 +05:30
audio_out Fix all test failures 2023-01-06 18:31:27 +05:30
audio_sound_test Add tests for SOUND and PLAY "MB" 2022-09-17 03:06:24 -04:00
audio_test Audio tests cannot be run on Linux 2022-05-12 00:21:02 -04:00
basic Update test license files 2022-10-25 07:28:35 +05:30
console Add more tests and dynamic library support 2022-05-12 00:21:02 -04:00
console_only Replace time() with std::chrono, fix startup delay 2023-01-08 20:24:25 -05:00
const Add CONST tests 2022-09-30 11:23:34 -04:00
data Add $CONSOLE:ONLY and libz tests 2022-09-17 03:06:24 -04:00
declare_library Add more tests and dynamic library support 2022-05-12 00:21:02 -04:00
declare_library_dynamic Add more tests and dynamic library support 2022-05-12 00:21:02 -04:00
declare_library_external Add more tests and dynamic library support 2022-05-12 00:21:02 -04:00
declare_library_header Add more tests and dynamic library support 2022-05-12 00:21:02 -04:00
declare_library_static Fix linking static libraries on Windows 2022-07-09 14:59:33 -04:00
deviceinput Disable deviceinput test on Linux 2022-06-09 21:30:37 -04:00
extra Fix compiling bas files relative to the CWD 2022-09-30 17:13:43 -04:00
font Update test license files 2022-10-25 07:28:35 +05:30
glut Add GLUT initialization tests 2022-11-29 20:04:53 -05:00
http _OpenClient() should return zero on connection failure, not error 2022-11-20 18:44:24 -05:00
icon Step 3: Update test cases 2022-08-10 00:51:12 +02:00
icon_relative Step 3: Update test cases 2022-08-10 00:51:12 +02:00
image Replace time() with std::chrono, fix startup delay 2023-01-08 20:24:25 -05:00
include_paths Fix compiling bas files relative to the CWD 2022-09-30 17:13:43 -04:00
libz Update test license files 2022-10-25 07:28:35 +05:30
midi Fix all test failures 2023-01-06 18:31:27 +05:30
name with spaces Add missing test for directory with spaces 2022-05-24 00:00:37 -04:00
opengl Add Compilation tests for different dependencies 2022-04-28 23:00:06 -04:00
paint Swap bmp test images for png 2022-11-09 21:56:44 -05:00
rotations Update rotation test to include more cases 2022-09-02 10:15:07 +05:30
screenimage Replace time() with std::chrono, fix startup delay 2023-01-08 20:24:25 -05:00
single'quote'test Fix compiling source files with single quotes in name 2022-09-09 09:59:43 -04:00
sockets Add Compilation tests for different dependencies 2022-04-28 23:00:06 -04:00
types Add testsuite of built-in Types 2022-10-01 14:18:53 -04:00
utilities Add PAINT tile image-based tests 2022-11-08 01:02:22 -05:00
versioninfo Add Compilation tests for different dependencies 2022-04-28 23:00:06 -04:00
versioninfo2 Add a few more VERSIONINFO tests 2022-05-06 14:29:37 -04:00
versioninfo3 Add a few more VERSIONINFO tests 2022-05-06 14:29:37 -04:00
winresource Step 3: Update test cases 2022-08-10 00:51:12 +02:00