2
$Id: clkdll.pas,v 1.1 2003/10/14 14:42:09 yuri Exp $
3
Copyright (c) 2002 by Mark Eckstein
4
Copyright (c) 2003 by Yuri Prokushev (prokushev@freemail.ru)
6
eCS Clock API (part of standard eCS installation)
8
This program is free software; you can redistribute it and/or modify it
9
under the terms of the GNU Library General Public License (LGPL) as
10
published by the Free Software Foundation; either version 2 of the
11
License, or (at your option) any later version. This program is
12
distributed in the hope that it will be useful, but WITHOUT ANY
13
WARRANTY; without even the implied warranty of MERCHANTABILITY or
14
FITNESS FOR A PARTICULAR PURPOSE.
16
See the GNU Library General Public License for more details. You should
17
have received a copy of the GNU Library General Public License along
18
with this program; if not, write to the Free Software Foundation, Inc.,
19
59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
21
1 **********************************************************************}
24
The Clock API is a set of functions, which offer you a variety of
25
time-related operations. You can use it like any other DLL provided
26
with OS/2 and eComStation. However, the Clock API DLL is not Rexx
38
If you need to know the universal world time call this API. The
39
value it returns is updated every 250 ms, so it's rather meant
40
for not-too-high precision tasks.
41
Return values: 0 ... ok
44
Function ClkQueryUTC(var Value: TDateTime): Cardinal; cdecl;
45
external 'clkdll' name 'ClkQueryUTC'; {index 00001}
48
You can obtain the time zone offset using this API.
49
Return values: 0 ... ok
53
Function ClkQueryUTCOffset(var Value: Longint): Cardinal; cdecl;
54
external 'clkdll' name 'ClkQueryUTCOffset'; {index 00002}
57
Get the difference between standard time and summer time in
58
seconds by calling this API.
59
Return values: 0 ... ok
62
Function ClkQueryDSTAdvance(var Value: Integer): Cardinal; cdecl;
63
external 'clkdll' name 'ClkQueryDSTAdvance'; {index 00003}
66
This returns the standard time zone identifier and date and
67
time of the next change to standard time.
68
Return values: 0 ... ok
73
Function ClkQuerySTData(ID: PChar; var NextDate: TDateTime): Cardinal; cdecl;
74
external 'clkdll' name 'ClkQuerySTData'; {index 00004}
77
This returns the summer time zone identifier and date and
78
time of the next change to summer time.
79
Return values: 0 ... ok
84
Function ClkQueryDSTData(ID: PChar; var NextDate: TDateTime): Cardinal; cdecl;
85
external 'clkdll' name 'ClkQueryDSTData'; {index 00005}
88
This returns the TZ string that is currently in use, independent
89
from the actual TZ environment setting.
90
Return values: 0 ... ok
93
Function ClkQueryTimeZone(value: PChar): Cardinal; cdecl;
94
external 'clkdll' name 'ClkQueryTimeZone'; {index 00006}
97
If you want to know in which hemisphere the computer is located
99
Value is either 0 for southern or 1 for northern hemisphere.
100
Return values: 0 ... ok
103
Function ClkQueryHemisphere(var Value: Integer): Cardinal; cdecl;
104
external 'clkdll' name 'ClkQueryHemisphere'; {index 00007}
107
The system's uptime is returned when calling this API. Opposed
108
to the OS/2 API for the same purpose this one's rollover will
109
be after approximately 130 years (untested!).
110
Return values: 0 ... ok
113
Function ClkQueryUptime(var Days, Hours, Minutes, Seconds, Hundredths: Cardinal): Cardinal; cdecl;
114
external 'clkdll' name 'ClkQueryUptime'; {index 00008}
117
Returns, whether a synchronization can be done (Value == 1) or
118
not (Value == 0). This depends on the chosen connection type and
119
the current connection status.
120
Return values: 0 ... ok
123
Function ClkCanSynchronize(var Value: Integer): Cardinal; cdecl;
124
external 'clkdll' name 'ClkCanSynchronize'; {index 00015}
127
Triggers a time synchronization.
128
Return values: 0 ... ok
129
64 ... writing to pipe failed
130
70 ... can't synchronize
131
128 ... clkbasic version could not be determined
132
129 ... clkbasic version unknow
134
Function ClkDoSynchronize: Cardinal; cdecl;
135
external 'clkdll' name 'ClkDoSynchronize'; {index 00013}
138
Queries, whether clkbasic is currently in the process of
139
synchronizing (Value == 1: yes, Value == 0: no)
140
Return values: 0 ... ok
143
Function ClkIsSynchronizing(var Value: Integer): Cardinal; cdecl;
144
external 'clkdll' name 'ClkIsSynchronizing'; {index 00014}
147
Returns the synchronization data. Date and time of the last
148
attempted synchronization, date and time of the last successful
149
synchronization, indicator for success of last attempt and the host
150
from where the time could be synched successfully.
151
Return values: 0 ... ok
154
Function ClkGetSynchData(var Last, LastSuccess: TDateTime;
155
var LastWasSuccessful: Integer;
156
LastSuccessfulHost: PChar): Cardinal; cdecl;
157
external 'clkdll' name 'ClkGetSynchData'; {index 00016}
160
external 'clkdll' name 'ClkQueryBasePath'; {index 00009}
161
external 'clkdll' name 'ClkQueryLanguagePath'; {index 00010}
162
external 'clkdll' name 'ClkQueryDialupState'; {index 00011}
163
external 'clkdll' name 'ClkQueryVersion'; {index 00012}
164
external 'clkdll' name 'ClkCallSettings'; {index 00017}
165
external 'clkdll' name 'ClkCallSchedulerHelper'; {index 00018}
174
Revision 1.1 2003/10/14 14:42:09 yuri
b'\\ No newline at end of file'