Re: Convert to C/C++?

2007-06-19 Thread Jorgen Grahn
On Thu, 14 Jun 2007 13:16:42 -0700, SpreadTooThin <[EMAIL PROTECTED]> wrote: > I am wondering if someone who knows the implemention of python's time > could help converting this to c/c++ > > nanoseconds = int(time.time() * 1e9) [straightforward non-time arithmetic snipped] > > v

Re: Convert to C/C++?

2007-06-14 Thread Tim Roberts
SpreadTooThin <[EMAIL PROTECTED]> wrote: > >I am wondering if someone who knows the implemention of python's time >could help converting this to c/c++ If you are running on Windows, you can replace this entire thing with one call to CoCreateGuid, possibly with a call to StringFromGUID to make

Re: Convert to C/C++?

2007-06-14 Thread Douglas Wells
In article <[EMAIL PROTECTED]>, SpreadTooThin <[EMAIL PROTECTED]> writes: > I am wondering if someone who knows the implemention of python's time > could help converting this to c/c++ First the obligatory sermon: If you are truly intending to utilize a UUID generator on a UNIX platform, I ur

Convert to C/C++?

2007-06-14 Thread SpreadTooThin
I am wondering if someone who knows the implemention of python's time could help converting this to c/c++ nanoseconds = int(time.time() * 1e9) # 0x01b21dd213814000 is the number of 100-ns intervals between the # UUID epoch 1582-10-15 00:00:00 an