コード例 #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
ファイル: os_c.cs プロジェクト: ehsan2022002/VirastarE
        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
ファイル: os_c.cs プロジェクト: pragmat1c/coolstorage
 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;
 }