Goober5000
a1bc06aeeb
accommodate elapsed time during debugging
...
If a breakpoint is hit in the code, the SDL time will keep running even though FSO doesn't realize things are effectively, if not actually, paused. Detect this situation and adjust the timestamp offset to compensate.
2022-01-20 21:13:52 -05:00
Goober5000
4ee84b71d7
refactor some names
2022-01-17 19:03:23 -05:00
Goober5000
18f4f490d0
time compression outline, static casts
2022-01-16 15:24:43 -05:00
Goober5000
97f9aa2259
move stuff here too
2022-01-16 15:24:43 -05:00
Goober5000
00de4c3e7e
timestamps should be running just about all the time
2022-01-16 15:24:43 -05:00
Goober5000
a1dadb1c0b
small refactor
2022-01-16 15:24:43 -05:00
Goober5000
8e33644a8f
since we used to fast-forward at the rate of 1/4 second per frame, simulate the same thing with the timer
2022-01-16 15:20:57 -05:00
Goober5000
88f4163ae3
always give the game priority when starting/stopping time
2022-01-16 15:20:57 -05:00
Goober5000
1b51225c51
convert the FSO timestamp system to use SDL time
...
Previously, the game used a dead-reckoning system for measuring time, where several time counters were incremented as long as time was running. This unfortunately has no way to synchronize time in the long term, and therefore in-game time will tend to run faster or slower than real time by a few percent, depending on various factors.
This PR redesigns the timestamp system to use the SDL time counter which will always keep it in sync with real time. However this necessarily involves a bit of clever handling when the game is paused and unpaused. It also revealed several minor bugs in several places in the code where timestamps were handled.
This PR is currently in draft status until the design can be updated to handle time compression. In all other respects it should be working.
2022-01-16 15:20:57 -05:00
Joshua Glatt
144d484c85
Replace rand() calls with a Random class ( #3332 )
2021-05-04 18:26:06 -07:00
asarium
acbac94685
Add GPU time tracing
...
This also adds nanosecond precision tracing for normal CPU events
2016-09-14 12:26:53 +02:00
asarium
baf7746986
Rename high res timer function to timer_get_microseconds
2016-08-31 14:32:53 +02:00
asarium
e8bd7363c8
Use microsecond precision for timestamps
...
This only increases resolution for the internal ticker but not for the
external timestamps
2016-08-31 14:32:53 +02:00
asarium
0169a5477c
Always use high resolution timers
2016-08-31 14:32:53 +02:00
asarium
2d4d0081cd
Merge branch 'master' into antipodes_/sync
...
Conflicts:
code/cmdline/cmdline.cpp
code/io/timer.cpp
code/network/multi.cpp
configure.ac
projects/MSVC_2005/Fred2.vcproj
projects/MSVC_2005/Freespace2.sln
projects/MSVC_2005/Freespace2.vcproj
projects/MSVC_2005/code.vcproj
projects/MSVC_2008/Fred2.vcproj
projects/MSVC_2008/Freespace2.doxproj
projects/MSVC_2008/Freespace2.vcproj
projects/MSVC_2008/code.vcproj
projects/MSVC_2010/Fred2.vcxproj
projects/MSVC_2012/Fred2.vcxproj
projects/MSVC_2012/Freespace2.vcxproj
projects/MSVC_2012/code.vcxproj
projects/MSVC_2012/code.vcxproj.filters
projects/Xcode4/FS2_Open.xcodeproj/project.pbxproj
projects/Xcode4/Frameworks.tgz
projects/Xcode4/Info.plist
2016-03-11 12:36:52 +01:00
Goober5000
746fe56b32
Merge pull request #525 from asarium/cleanup/timer
...
Remove some unused code from timer.h/.cpp
2016-01-31 16:12:04 -05:00
asarium
fc6bc3a1c6
Remove some unused code from timer.h/.cpp
...
The removed code has been replaced by the profiling subsystem.
2016-01-29 22:00:58 +01:00
asarium
54b2eddc14
Change timestamp integer handling again
2016-01-28 16:39:10 +01:00
asarium
64c4e4d7b4
Use integer math instead of floats for timestamps
2016-01-27 15:34:37 +01:00
asarium
75625270c9
Use the correct type for high resolution timers
2016-01-27 14:27:46 +01:00
Swifty
dd9f9ed921
Improved profiling code to have a timing resolution of microseconds instead of milliseconds.
2015-05-05 20:41:05 -07:00
portej05
719825f80d
The big CVS comment removal. This chops approx. 3.5mb off a full checkout.
...
I've tested this through compiling and through hand checking.
Normalises line endings in ALL files to \n.
2009-06-20 08:08:20 +00:00
taylor
3abccfa76c
sync up to current FS2NetD code (fixes so many little problems/issues that it's not even funny)
2008-11-09 05:08:19 +00:00
Goober5000
52f136f9ad
remove PreProcDefine #includes in FS2
...
--Goober5000
2005-07-13 03:15:53 +00:00
Kazan
7d1c8b185d
added preprocdefines.h to prevent what happened with fred -- make sure to make all fred2 headers include this file as the _first_ include -- i have already modified fs2 files to do this
2004-08-11 05:06:36 +00:00
penguin
0c503be8d1
The big include file move
2002-08-01 01:41:11 +00:00
penguin
3463682f1a
Back-port to MSVC
2002-07-07 19:56:00 +00:00
penguin
8f92eebd34
Warpcore CVS sync
2002-06-03 04:10:40 +00:00
penguin
663b3471b9
Volition sources -- warpcore CVS import
2002-06-03 03:26:03 +00:00