1
1
Fork 0
mirror of https://github.com/QB64-Phoenix-Edition/QB64pe.git synced 2024-07-22 19:35:13 +00:00
QB64-PE/internal/c
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
..
libqb Replace time() with std::chrono, fix startup delay 2023-01-08 20:24:25 -05:00
parts BufferMap: only delete assignment operators 2023-01-09 06:11:21 +05:30
.gitignore setup_win.bat: create internal/c/c_compiler 2022-04-28 17:15:35 -04:00
common.h Include stdint.h on Windows, change integer defines to use them 2022-11-12 19:48:26 -05:00
libqb.cpp Replace time() with std::chrono, fix startup delay 2023-01-08 20:24:25 -05:00
libqb.h Fix common dialogs build.mk bug 2022-10-23 22:44:39 +05:30
msbin.c Format other various source files 2022-05-06 13:20:30 -04:00
mtri1.cpp Run clang-format on ./internal/c/*cpp files 2022-05-06 13:20:30 -04:00
mtri1s.cpp Run clang-format on ./internal/c/*cpp files 2022-05-06 13:20:30 -04:00
mtri1t.cpp Run clang-format on ./internal/c/*cpp files 2022-05-06 13:20:30 -04:00
mtri1ts.cpp Run clang-format on ./internal/c/*cpp files 2022-05-06 13:20:30 -04:00
mtri2.cpp Run clang-format on ./internal/c/*cpp files 2022-05-06 13:20:30 -04:00
mtri2s.cpp Run clang-format on ./internal/c/*cpp files 2022-05-06 13:20:30 -04:00
mtri2t.cpp Run clang-format on ./internal/c/*cpp files 2022-05-06 13:20:30 -04:00
mtri2ts.cpp Run clang-format on ./internal/c/*cpp files 2022-05-06 13:20:30 -04:00
mtri3.cpp Run clang-format on ./internal/c/*cpp files 2022-05-06 13:20:30 -04:00
mtri3s.cpp Run clang-format on ./internal/c/*cpp files 2022-05-06 13:20:30 -04:00
mtri3t.cpp Run clang-format on ./internal/c/*cpp files 2022-05-06 13:20:30 -04:00
mtri3ts.cpp Run clang-format on ./internal/c/*cpp files 2022-05-06 13:20:30 -04:00
mtri4.cpp Run clang-format on ./internal/c/*cpp files 2022-05-06 13:20:30 -04:00
mtri4s.cpp Run clang-format on ./internal/c/*cpp files 2022-05-06 13:20:30 -04:00
mtri4t.cpp Run clang-format on ./internal/c/*cpp files 2022-05-06 13:20:30 -04:00
mtri4ts.cpp Run clang-format on ./internal/c/*cpp files 2022-05-06 13:20:30 -04:00
myip.cpp Step 10: Update remaining stuff 2022-08-12 02:54:12 +02:00
os.h Include stdint.h on Windows, change integer defines to use them 2022-11-12 19:48:26 -05:00
purge_all_precompiled_content.bat Change purge scripts to use make clean 2022-05-19 09:17:13 -04:00
purge_all_precompiled_content.command Change purge scripts to use make clean 2022-05-19 09:17:13 -04:00
purge_all_precompiled_content.sh Change purge scripts to use make clean 2022-05-19 09:17:13 -04:00
qbx.cpp Replace time() with std::chrono, fix startup delay 2023-01-08 20:24:25 -05:00
time64.c Format other various source files 2022-05-06 13:20:30 -04:00
time64.h Format other various source files 2022-05-06 13:20:30 -04:00