Es gettime

From EventScripts Community Encyclopedia


Overview

Syntax: es_gettime <variable>

Note: Command parameters are described inside the < and > characters. Optional parameters are contained within [ and ] characters.

Variation of this command that doesn't expand variables: es_xgettime

Description

Stores the current seconds since January 1, 1970 in variable. Always growing value. EventScripts will expand any variables it finds.

Parameters

  • variable - name of the variable to store the current time.


Examples

es_xsetinfo timenow 0
es_xgettime timenow 
es_msg The number of seconds elapsed since Jan 1 1970 is server_var(timenow)


Notes

  • The value can be too large for some math operations. For doing math operations on time, please use es_gettimestamp instead.


See also

blog comments powered by Disqus