# Time::getMillisecondCounter

**URL:** <https://forum.juce.com/t/time-getmillisecondcounter/5330>\
**Category:** Linux\
**Created:** [May 31, 2010, 4:36pm UTC](https://forum.juce.com/t/time-getmillisecondcounter/5330 "2010-05-31T16:36:10Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![X-Ryl669](https://avatars.discourse-cdn.com/v4/letter/x/a5b964/32.png) [@X-Ryl669](https://forum.juce.com/u/X-Ryl669)\
**Post date:** [May 31, 2010, 4:36pm UTC](https://forum.juce.com/t/time-getmillisecondcounter/5330/1 "2010-05-31T16:36:10Z")

</div>

Hi,

I’d be nice if the both getMillisecondCounter and getMillisecondCounterHiRes were using the same time origin (it does in Windows, but not on Linux)  
I’m using getMillisecondCounterHiRes in one of my component, and waitForMillisecondCounter, and this code was struck in, what looks like from user’s POV, an infinite loop.

For those searching the forum, the workaround is "uint32 offset = (uint32)getMillisecondCounterHiRes() - getMillisecondCounter(); waitForMillisecondCounter(destInDouble - offset);"  
Beware, this only works just before calling waitForMsCounter

---

<div class="post-metadata">

**Author:** ![jules](https://avatars.discourse-cdn.com/v4/letter/j/41988e/32.png) [@jules](https://forum.juce.com/u/jules)\
**Post date:** [June 1, 2010, 8:44am UTC](https://forum.juce.com/t/time-getmillisecondcounter/5330/2 "2010-06-01T08:44:22Z")

</div>

Thanks - I’ll change it to make sure it all uses the same time-base…
