digitalmars.D.learn - TickDuration.ticksPerSec why would it be zero?
- Jesse Phillips (4/4) Apr 15 2011 The documentation[1] states one should check if the value is zero to see...
- Jonathan M Davis (9/17) Apr 15 2011 It means that QueryPerformanceFrequency failed:
The documentation[1] states one should check if the value is zero to see if they can use it. For me this value is 0, Windows XP. So why would it be 0 and what do I use when it is? On a related note, anyone know of a UUID generator? I'm using a possible incorrect translation of the example in RFC 4122[2]. 1. http://digitalmars.com/d/2.0/phobos/core_time.html#TickDuration 2. http://www.ietf.org/rfc/rfc4122.txt
Apr 15 2011
The documentation[1] states one should check if the value is zero to see if they can use it. For me this value is 0, Windows XP. So why would it be 0 and what do I use when it is?It means that QueryPerformanceFrequency failed: http://msdn.microsoft.com/en-us/library/ms644905(VS.85).aspx Looking at the doc page for it, it looks like it means that your hardware doesn't support a high-resolution performance counter. I should probably improve TickDuration's docs on that.On a related note, anyone know of a UUID generator? I'm using a possible incorrect translation of the example in RFC 4122[2]. 1. http://digitalmars.com/d/2.0/phobos/core_time.html#TickDuration 2. http://www.ietf.org/rfc/rfc4122.txtIf all you need to do is generate one, and you're on Linux, then uuidgen would do it, and I guess that you'd use libuuid if you wanted to do it programatically. But I have noe idea what you'd do on Windows. - Jonathan M Davis
Apr 15 2011