-
Notifications
You must be signed in to change notification settings - Fork 10
/
Copy pathtime.inc
executable file
·56 lines (50 loc) · 2.39 KB
/
time.inc
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
#if defined _time_included
#endinput
#endif
#define _time_included
/**
* <library name="time" summary="Date/time functions.">
* <license>
* (c) Copyright 2001-2005, ITB CompuPhase
* This file is provided as is (no warranties).
* </license>
* <summary pawndoc="true">
* This library uses the enhanced <em>pawndoc.xsl</em> from
* <a href="https://github.com/pawn-lang/pawndoc">pawn-lang/pawndoc</a>.
* This XSL has features such as library and markdown support, and will not
* render this message when used.
* </summary>
* </library>
*/
#pragma library Time
/**
* <library>time</library>
* <summary>Get the current server time.</summary>
* <param name="hour">The variable to store the hour in, passed by reference (optional=<b><c>0</c></b>)</param>
* <param name="minute">The variable to store the minute in, passed by reference (optional=<b><c>0</c></b>)</param>
* <param name="second">The variable to store the seconds in, passed by reference (optional=<b><c>0</c></b>)</param>
* <seealso name="getdate"/>
* <returns>The function itself returns a Unix Timestamp.</returns>
*/
native gettime(&hour = 0, &minute = 0, &second = 0);
/**
* <library>time</library>
* <summary>Get the current server date.</summary>
* <param name="year">The variable to store the year in, passed by reference (optional=<b><c>0</c></b>)</param>
* <param name="month">The variable to store the month in, passed by reference (optional=<b><c>0</c></b>)</param>
* <param name="day">The variable to store the day in, passed by reference (optional=<b><c>0</c></b>)</param>
* <seealso name="gettime"/>
* <returns>The number of days since the start of the year.</returns>
*/
native getdate(&year = 0, &month = 0, &day = 0);
/**
* <library>time</library>
* <summary>This function can be used as a replacement for <a href="#GetTickCount">GetTickCount</a>,
* as it returns the number of milliseconds since the start-up of the server.</summary>
* <param name="granularity">Upon return, this value contains the number of ticks that the internal
* system time will tick per second. This value therefore indicates the accuracy of the return value
* of this function (optional=<b><c>0</c></b>)</param>
* <returns>The number of milliseconds since start-up of the system. For a 32-bit cell, this count
* overflows after approximately 24 days of continuous operation.</returns>
*/
native tickcount(&granularity = 0);