MongoTimestamp
PHP 手册

MongoTimestamp::__construct

(PECL mongo >= 1.0.1)

MongoTimestamp::__construct创建一个新的时间戳。

说明

public MongoTimestamp::__construct ([ int $sec = time() [, int $inc ]] )

创建一个新的时间戳。如果没有指定参数,将使用当前的时间戳,也会自动提供增量。 模块加载时增量设置为 0,并且在每次调用构造器时自动增加(没有传入 $inc 参数时)。

参数

sec

自 1970 年 1 月 1 日以来的秒数。

inc

增量。

返回值

返回新的 timestamp。

参见


MongoTimestamp
PHP 手册