Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
PoroCYon
Bonzomatic
Commits
12916575
Commit
12916575
authored
Oct 18, 2020
by
Gargaj
Browse files
retain a bit more precision in the timer
parent
fc8f250e
Changes
1
Show whitespace changes
Inline
Side-by-side
src/platform_w32_common/Timer.cpp
View file @
12916575
...
...
@@ -4,6 +4,7 @@ namespace Timer
{
LARGE_INTEGER
LastPCV
=
{
0
}
;
double
currentTime
=
0.0
;
double
startTime
=
0.0
;
double
_Time
()
{
...
...
@@ -21,13 +22,13 @@ namespace Timer
return
currentTime
*
1000.0
f
;
}
float
startTime
=
0.0
;
void
Start
()
{
startTime
=
(
float
)
_Time
();
}
float
GetTime
()
{
return
(
float
)
_Time
()
-
startTime
;
return
(
float
)
(
_Time
()
-
startTime
)
;
}
}
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment