目录

now

此方法返回元组{MegaSecs,Secs,MicroSecs},这是自1970年1月1日格林尼治标准时间00:00起经过的时间。

语法 (Syntax)

now()

参数 (Parameters)

  • None

返回值 (Return Value)

返回元组{MegaSecs,Secs,MicroSecs},这是自1970年1月1日格林威治标准时间00:00起经过的时间。

例如 (For example)

-module(helloworld). 
-export([start/0]). 
start() -> 
   io:fwrite("~p~n",[erlang:now()]).

输出 (Output)

当我们运行上述程序时,我们将得到以下结果。 根据系统的不同,输出会有所不同。

{1460,893073,767749}
↑回到顶部↑
WIKI教程 @2018