Пример #1
0
/*
** Return the current time as a Julian Day number in pTimeOut.
*/
        static int vfstraceCurrentTime(sqlite3_vfs pVfs, double pTimeOut)
        {
            vfstrace_info pInfo = (vfstrace_info)pVfs.pAppData;
            sqlite3_vfs   pRoot = pInfo.pRootVfs;

            return(pRoot.xCurrentTime(pRoot, ref pTimeOut));
        }
Пример #2
0
        static int sqlite3OsCurrentTimeInt64(sqlite3_vfs pVfs, ref sqlite3_int64 pTimeOut)
        {
            int rc;

            /* IMPLEMENTATION-OF: R-49045-42493 SQLite will use the xCurrentTimeInt64()
            ** method to get the current date and time if that method is available
            ** (if iVersion is 2 or greater and the function pointer is not NULL) and
            ** will fall back to xCurrentTime() if xCurrentTimeInt64() is
            ** unavailable.
            */
            if (pVfs.iVersion >= 2 && pVfs.xCurrentTimeInt64 != null)
            {
                rc = pVfs.xCurrentTimeInt64(pVfs, ref pTimeOut);
            }
            else
            {
                double r = 0;
                rc       = pVfs.xCurrentTime(pVfs, ref r);
                pTimeOut = (sqlite3_int64)(r * 86400000.0);
            }
            return(rc);
        }
Пример #3
0
 static int sqlite3OsCurrentTimeInt64( sqlite3_vfs pVfs, ref sqlite3_int64 pTimeOut )
 {
   int rc;
   /* IMPLEMENTATION-OF: R-49045-42493 SQLite will use the xCurrentTimeInt64()
   ** method to get the current date and time if that method is available
   ** (if iVersion is 2 or greater and the function pointer is not NULL) and
   ** will fall back to xCurrentTime() if xCurrentTimeInt64() is
   ** unavailable.
   */
   if ( pVfs.iVersion >= 2 && pVfs.xCurrentTimeInt64 != null )
   {
     rc = pVfs.xCurrentTimeInt64( pVfs, ref pTimeOut );
   }
   else
   {
     double r = 0;
     rc = pVfs.xCurrentTime( pVfs, ref r );
     pTimeOut = (sqlite3_int64)( r * 86400000.0 );
   }
   return rc;
 }