Please ignore my previous post.  Doug's suggestion is much better.

~Eric

Eric Minbiole wrote:
>> I would like CURRENT_TIMESTAMP to be more accurate than just one second, 
>> any suggestions on how I might do that once?  My solution is all a C/C++ 
>> interface, so all features are open to me.
> 
> One option would be to create and register a custom SQL function that 
> returned the current time, including fractional seconds.  If you format 
> your result as "YYYY-MM-DD HH:MM:SS.SSS", then all standard SQLite date 
> functions should work as-is (up to millisecond resolution).
> 
> Of course, how you actually get the time from the O/S will depend on 
> your particular O/S.  For windows, GetSystemTimeAsFileTime() may be of 
> use.  (Resolution around 1~16ms depending on O/S version.)  I'm sure 
> others can help with APIs for other Operating Systems.
> 
> Some links:
> 
> http://www.sqlite.org/cvstrac/wiki?p=DateAndTimeFunctions
> http://www.sqlite.org/c3ref/create_function.html
> http://msdn.microsoft.com/en-us/library/ms724397(VS.85).aspx
> 
> ~Eric
> _______________________________________________
> sqlite-users mailing list
> sqlite-users@sqlite.org
> http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to