From WikiChip
Difference between revisions of "mirc/identifiers/$uptime"
Maroonbells (talk | contribs) (Created content for empty page) |
m |
||
(One intermediate revision by the same user not shown) | |||
Line 1: | Line 1: | ||
− | {{mirc title|$uptime | + | {{mirc title|$uptime identifier}}'''$uptime''' returns the number of milliseconds since the indicated event. |
− | + | ||
== Synopsis == | == Synopsis == | ||
− | <pre>$uptime( <mirc | server | system > [,N] )</pre> | + | <pre>$uptime(<mirc> | <server> | <system>[,N])</pre> |
== Parameters == | == Parameters == | ||
− | |||
<span style="display: inline-block; width: 90px;">'''mIRC'''</span>The time period counts since mIRC started<br /> | <span style="display: inline-block; width: 90px;">'''mIRC'''</span>The time period counts since mIRC started<br /> | ||
<span style="display: inline-block; width: 90px;">'''server'''</span>The time period counts since connected to that server.<br /> | <span style="display: inline-block; width: 90px;">'''server'''</span>The time period counts since connected to that server.<br /> | ||
Line 19: | Line 18: | ||
== Example == | == Example == | ||
− | |||
<pre> | <pre> | ||
//echo -a $uptime(system,0) is the same as $ticks | //echo -a $uptime(system,0) is the same as $ticks | ||
Line 27: | Line 25: | ||
//echo -a Windows has been running for $uptime(system,2) since booting up $asctime( $calc($ctime - $uptime(system,3) ) ) | //echo -a Windows has been running for $uptime(system,2) since booting up $asctime( $calc($ctime - $uptime(system,3) ) ) | ||
</pre> | </pre> | ||
− | |||
== Compatibility == | == Compatibility == | ||
Line 35: | Line 32: | ||
* {{mIRC|$ticks}} | * {{mIRC|$ticks}} | ||
* {{mIRC|$ctime}} | * {{mIRC|$ctime}} | ||
+ | {{mIRC identifier list}} | ||
− | [[Category: | + | [[Category:mIRC identifiers|uptime]] |
Latest revision as of 16:26, 22 September 2017
Commands & Identifiers
Basics
Events
Matching Tools
Data Storage
Control Structures
GUI Scripting
Sockets
Advanced Scripting
Additional Resources
Security
Other
$uptime returns the number of milliseconds since the indicated event.
Synopsis[edit]
$uptime(<mirc> | <server> | <system>[,N])
Parameters[edit]
mIRCThe time period counts since mIRC started
serverThe time period counts since connected to that server.
systemThe time period counts since windows booted up.
Optional Parameter N is an integer 0-3:
0 Default. Returns time as an integer number of milliseconds
1 Instead of returning time as an integer number of milliseconds, is Ndays Nhrs Nmins Nsecs
2 Same as N 1 except omits the Nsecs
3 Same as N 0, except returns number of seconds, dropping the last 3 digits.
Example[edit]
//echo -a $uptime(system,0) is the same as $ticks //echo -a $uptime(system,3) is the same as $left($ticks,-3) //echo -a mIRC has been running for $uptime(mirc,2) //echo -a mIRC has been connected to $network server $server for $uptime(server,2) //echo -a Windows has been running for $uptime(system,2) since booting up $asctime( $calc($ctime - $uptime(system,3) ) )
Compatibility[edit]
Added: mIRC v5.9
Added on: 26 Apr 2001
Note: Unless otherwise stated, this was the date of original functionality.
Further enhancements may have been made in later versions.
See also[edit]
mIRC identifier list