本文整理汇总了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;
}
示例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++;
}
示例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);
}
示例4: getNewPasswordChangeCode
public function getNewPasswordChangeCode(&$record)
{
return md5(CoreUtils::getTimeMicroseconds() . 'ly2bt94u6w') . 'G' . $record['id'];
}