Hi Brian, On Mon, Oct 25, 2010 at 12:21 AM, Brian Aker <[email protected]> wrote: > Hi! > > On Oct 24, 2010, at 4:52 PM, David Shrewsbury wrote: > >> My question is, should we be using the nanosecond >> version in Session::getCurrentTimestamp()? Does anyone >> have any concerns around using a single 64-bit number >> rather than a 64-bit value for seconds AND a 32-bit value >> for micro/nano seconds? > > Look at the wrapper in boost for gettimeofday, it covers all of this (and is > portable!).
I did, and if we just want access to epoch seconds and microseconds, like we have now, then this library seems a bit overkill for that. I couldn't find a simple way to get access to these values that didn't have a lot of overhead. The only way I found was: time_duration td = ptime(microsec_clock::local_time()) - ptime(date(1970,1,1)); epoch_seconds = td.total_seconds(); micro_seconds = td.total_microseconds(); I don't like the idea of creating four temporary objects just to get to these values. -Dave _______________________________________________ Mailing list: https://launchpad.net/~drizzle-discuss Post to : [email protected] Unsubscribe : https://launchpad.net/~drizzle-discuss More help : https://help.launchpad.net/ListHelp

