View Issue Details

IDProjectCategoryView StatusLast Update
0003748Spring engineGeneralpublic2013-05-03 01:55
Reportercleanrock Assigned TojK  
PrioritynormalSeveritymajorReproducibilityalways
Status resolvedResolutionfixed 
Product Version94.1.1+git 
Summary0003748: os.clock() too fast
DescriptionWhen testing "Zero-K test-10026" with "Spring 94.1.1-330-gef0b12f develop (OMP)" i noticed that the build gesture menu popped up when i tried to move my com.
Turns out os.clock() is going too fast here:
[f=0001066] Loading: LuaUI/Widgets/print_clock.lua
[f=0001067] 343.31002807617
[f=0001068] 343.51000976562
[f=0001069] 343.66000366211
[f=0001069] 343.79998779297
[f=0001070] 343.96997070312
[f=0001071] 344.14001464844
[f=0001072] 344.32000732422
[f=0001072] 344.44998168945
[f=0001073] 344.64001464844
[f=0001074] 344.80999755859
[f=0001074] 344.94000244141

Full infolog attached.
TagsNo tags attached.
Attached Files
infolog.txt (Attachment missing)
Checked infolog.txt for Errors

Activities

cleanrock

2013-05-01 07:52

reporter   ~0010599

Its still too fast, now it also only return integers.

cleanrock

2013-05-02 17:34

reporter   ~0010603

os.clock is not too fast, os.clock returns CPU time.
Since OMP threads consume CPU time os.clock was very fast here.
We shall revert
https://github.com/spring/spring/commit/ec08ef903078c9bf79a62204f22238e6eb8de231
so we return a real number again.
I am looking into making os.time usable.

cleanrock

2013-05-02 18:52

reporter   ~0010604

os.time with lua_number as float do not have precision to get fractions of seconds, it doesnt even have precision enough for seconds (u get new value every 128 seconds).

os.clock return process real time on windows and CPU time on linux.

We can make os.clock return process real time on linux too or make a new spring lua function to get real time.
I think its best to make os.clock return real time on all platforms.

Issue History

Date Modified Username Field Change
2013-04-28 10:04 cleanrock New Issue
2013-04-28 10:04 cleanrock File Added: infolog.txt
2013-04-28 21:57 jK Status new => resolved
2013-04-28 21:57 jK Resolution open => fixed
2013-04-28 21:57 jK Assigned To => jK
2013-05-01 07:52 cleanrock Note Added: 0010599
2013-05-01 07:52 cleanrock Status resolved => feedback
2013-05-01 07:52 cleanrock Resolution fixed => reopened
2013-05-01 07:52 cleanrock Status feedback => assigned
2013-05-02 17:06 cleanrock Assigned To jK => cleanrock
2013-05-02 17:34 cleanrock Note Added: 0010603
2013-05-02 18:52 cleanrock Note Added: 0010604
2013-05-02 19:02 jK Changeset attached => spring develop f2f48213
2013-05-02 19:02 jK Assigned To cleanrock => jK
2013-05-03 01:55 jK Status assigned => resolved
2013-05-03 01:55 jK Resolution reopened => fixed