-
Notifications
You must be signed in to change notification settings - Fork 127
Expand file tree
/
Copy pathTODO2.txt
More file actions
51 lines (43 loc) · 2.86 KB
/
TODO2.txt
File metadata and controls
51 lines (43 loc) · 2.86 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
GS
Jan. 2026
Newest on BOTTOM.
Jan. 2026
Timing improvements in "cpp/timing_and_precision_Windows_and_Linux_tests.cpp" and "cpp/Windows_WIP/" et al:
[ ] add a periodic stats print task to show CPU usage, loop freq, avg. processing time, etc. once per second!
[ ] Estimate CPU usage in the main loop too.
cpu usage = non_sleep_time/total_time
total_time = sleep_time + non_sleep_time
[ ] Answer this question here!: https://stackoverflow.com/questions/13397571/precise-thread-sleep-needed-max-1ms-error
[ ] Be sure to state my exact OSs, hardware, and compiler versions used on each OS.
[ ] Update my main C++ precision timing Stack Overflow answer with a new section on this.
[ ] Update and commit my cpp/timing_and_precision_Windows_and_Linux_tests.cpp changes on Linux.
[ ] Add a struct to capture all relevant inputs, outputs, stats, etc. Make it global for expediency.
[ ] Tabulate the results at the end (use AI).
[ ] write up results into a new answer here: https://stackoverflow.com/questions/13397571/precise-thread-sleep-needed-max-1ms-error
[ ] Add my changes from Windows into that file too.
[ ] Add sleep tests to easily test these things:
[x] *****+OPEN AND STUDY THIS AI chat: https://share.google/aimode/8zx15oregqzPE3Q98
[x] 1) normal C++ `std::this_thread::sleep_for()`
[ ] 2) `std::this_thread::sleep_for()` with Windows special call for high precision sleep (doesn't work)
[ ] 3) Windows Sleep() call withOUT the 1ms precision fix
[ ] 4) Windows Sleep() call WITH the 1ms precision fix
[x] BE SURE TO have each sleep function allow CPU-usage timing by returning via output pointers the actual sleep time!
[ ] Windows Sleep() - don't wrap with timeBeginPeriod()/timeEndPeriod() calls--wasted time: ~200 us each call (range: 2~500us); instead, use the special Windows API call to set high precision sleep globally for the whole program!
[ ] Save my sleep_until_ms func in my hello world repo, and add it to stack overflow!!
NEXT:
eRCaGuy_hello_world/docker/docker_run.sh:
[x] Add a main() func. and follow better architectural practices.
[x] Have it auto-build docker if the image doesn't exist yet, and run otherwise.
[x] Make it work when your pwd is outside the repo (ex: in ~) and you call the docker_run.sh script.
[x] Have sleep_test() use my stats struct and function to calculate stats
[x] git commit the work
[x] store results stats from each run into a global vector or something
[ ] print a markdown table of the results
[ ] begin implementing more of the sleep funcs with the different mechanisms to sleep
[ ] get to a stopping point ASAP so I can work on other things!
Fri. 17 Apr. 2026
[x] Fix cpp/Makefile and test it out
NEXT:
[ ] fix windows build bugs: `make timing__timing_and_precision_Windows_and_Linux_tests-windows`
[ ] finish the file: timing__timing_and_precision_Windows_and_Linux_tests.cpp
[ ] see above