View Issue Details [ Jump to Notes ] | [ Issue History ] [ Print ] | ||||||||
ID | Project | Category | View Status | Date Submitted | Last Update | ||||
---|---|---|---|---|---|---|---|---|---|
0004025 | Spring engine | General | public | 2013-10-05 22:53 | 2013-10-08 12:52 | ||||
Reporter | silentwings | ||||||||
Assigned To | Kloot | ||||||||
Priority | high | Severity | major | Reproducibility | always | ||||
Status | closed | Resolution | duplicate | ||||||
Product Version | 94.1 | ||||||||
Target Version | Fixed in Version | ||||||||
Summary | 0004025: Spring.DIffTimers always returns 0 | ||||||||
Description | See the code below, which should compare the timer in every drawframe to the timer from the previous gameframe - it spams only 0s to the screen. | ||||||||
Steps To Reproduce | function widget:GetInfo() return { name = "Timer Test", desc = "", author = "TFC", date = "Oct 05, 2013", license = "MIT", layer = -9000, enabled = true } end local othertimer function widget:GameFrame(n) if n == 30 then othertimer = Spring.GetTimer() end end function widget:DrawScreen() if (othertimer) then local t = Spring.GetTimer() Spring.Echo(Spring.DiffTimers(t, othertimer)) end end | ||||||||
Additional Information | presumably its related to http://springrts.com/mantis/view.php?id=3845 | ||||||||
Tags | No tags attached. | ||||||||
Checked infolog.txt for Errors | |||||||||
Attached Files |
|
![]() |
|||||||||||
|
![]() |
|
silentwings (reporter) 2013-10-05 22:57 Last edited: 2013-10-05 22:58 |
tested with 94.1.1+1241 and ba-svn + ba chickens (because this bug breaks a part of chickens) opps - i set the wrong version above |
Kloot (developer) 2013-10-05 23:57 |
worksforme but it points directly to chrono::high_resolution_clock failing spring_gettime() --> spring_time::gettime() --> spring_time_native(Cpp11Clock::Get()) --> chrono::duration_cast<chrono::nanoseconds>(chrono::high_resolution_clock::now().time_since_epoch()).count() |
![]() |
|||
Date Modified | Username | Field | Change |
---|---|---|---|
2013-10-05 22:53 | silentwings | New Issue | |
2013-10-05 22:57 | silentwings | Note Added: 0011685 | |
2013-10-05 22:58 | silentwings | Note Edited: 0011685 | View Revisions |
2013-10-05 23:57 | Kloot | Note Added: 0011689 | |
2013-10-06 00:07 | Kloot | Relationship added | related to 0003845 |
2013-10-06 02:21 | Kloot | Status | new => closed |
2013-10-06 02:21 | Kloot | Assigned To | => Kloot |
2013-10-06 02:21 | Kloot | Resolution | open => duplicate |
2013-10-08 12:52 | Kloot | Relationship added | related to 0004040 |