當前位置: 首頁>>代碼示例>>PHP>>正文


PHP CoreUtils::getTimeMicroseconds方法代碼示例

本文整理匯總了PHP中CoreUtils::getTimeMicroseconds方法的典型用法代碼示例。如果您正苦於以下問題:PHP CoreUtils::getTimeMicroseconds方法的具體用法?PHP CoreUtils::getTimeMicroseconds怎麽用?PHP CoreUtils::getTimeMicroseconds使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在CoreUtils的用法示例。


在下文中一共展示了CoreUtils::getTimeMicroseconds方法的4個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: eventFinish

 public function eventFinish($category, $eventName)
 {
     $eventId = $this->getIdByName($eventName);
     if (empty($this->info[$category]['events'][$eventId]['eventName'])) {
         $this->info[$category]['events'][$eventId]['eventName'] = $eventName;
     }
     $this->info[$category]['events'][$eventId]['finishTime'] = CoreUtils::getTimeMicroseconds() - $this->startTime;
 }
開發者ID:piotrPiechura,項目名稱:3dPathProject,代碼行數:8,代碼來源:CoreDebug.class.php

示例2: add

 public static function add($pointName = '')
 {
     if (self::$index == 0) {
         self::$timePoints = array();
     }
     self::$timePoints[self::$index] = array();
     $currentTime = CoreUtils::getTimeMicroseconds();
     self::$timePoints[self::$index]['diff'] = self::$index != 0 ? $currentTime - self::$timePoints[self::$index - 1]['time'] : 0;
     self::$timePoints[self::$index]['time'] = $currentTime;
     self::$timePoints[self::$index]['name'] = $pointName;
     self::$index++;
 }
開發者ID:piotrPiechura,項目名稱:3dPathProject,代碼行數:12,代碼來源:CoreTestTime.class.php

示例3: updateLoginHistory

 protected function updateLoginHistory($loginHistoryDAO, $type, $userId, $loginSuccessful)
 {
     $ip = isset($_SERVER['REMOTE_ADDR']) ? $_SERVER['REMOTE_ADDR'] : null;
     $host = isset($_SERVER['REMOTE_HOST']) ? gethostbyaddr($_SERVER['REMOTE_HOST']) : ($ip ? gethostbyaddr($ip) : null);
     $record = $loginHistoryDAO->getRecordTemplate();
     $record['loginHistorySuccess'] = $loginSuccessful ? 1 : null;
     $record['loginHistoryTime'] = CoreUtils::getDateTime();
     $record['loginHistoryMicrotime'] = CoreUtils::getTimeMicroseconds();
     $record['loginHistoryIP'] = $ip;
     if ($host != $ip) {
         $record['loginHistoryHost'] = $host;
     }
     $record['loginHistoryPHPSessionId'] = CoreServices::get('request')->getSessionId();
     $record[$type . 'Id'] = $userId;
     $loginHistoryDAO->save($record);
 }
開發者ID:piotrPiechura,項目名稱:3dPathProject,代碼行數:16,代碼來源:CoreAccessVariant1.class.php

示例4: getNewPasswordChangeCode

 public function getNewPasswordChangeCode(&$record)
 {
     return md5(CoreUtils::getTimeMicroseconds() . 'ly2bt94u6w') . 'G' . $record['id'];
 }
開發者ID:piotrPiechura,項目名稱:3dPathProject,代碼行數:4,代碼來源:UserDAO.class.php


注:本文中的CoreUtils::getTimeMicroseconds方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。