author | Claus Gittinger <cg@exept.de> |
Tue, 07 Jan 1997 12:02:05 +0100 | |
changeset 2072 | e84dbf5e5424 |
parent 1500 | d42e61e53cee |
child 2310 | 2cb1366e0eb3 |
permissions | -rw-r--r-- |
240 | 1 |
" |
2 |
COPYRIGHT (c) 1995 by Claus Gittinger |
|
3 |
All Rights Reserved |
|
4 |
||
5 |
This software is furnished under a license and may be used |
|
6 |
only in accordance with the terms of that license and with the |
|
7 |
inclusion of the above copyright notice. This software may not |
|
8 |
be provided or otherwise made available to, or used by, any |
|
9 |
other person. No title to or ownership of the software is |
|
10 |
hereby transferred. |
|
11 |
" |
|
12 |
||
13 |
Magnitude subclass:#AbstractTime |
|
1227
e89b39909085
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
699
diff
changeset
|
14 |
instanceVariableNames:'' |
e89b39909085
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
699
diff
changeset
|
15 |
classVariableNames:'' |
e89b39909085
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
699
diff
changeset
|
16 |
poolDictionaries:'' |
e89b39909085
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
699
diff
changeset
|
17 |
category:'Magnitude-General' |
240 | 18 |
! |
19 |
||
1500
d42e61e53cee
changed osTime to a largeInt, which includes the milliseconds
Claus Gittinger <cg@exept.de>
parents:
1476
diff
changeset
|
20 |
!AbstractTime class methodsFor:'documentation'! |
240 | 21 |
|
22 |
copyright |
|
23 |
" |
|
24 |
COPYRIGHT (c) 1995 by Claus Gittinger |
|
25 |
All Rights Reserved |
|
26 |
||
27 |
This software is furnished under a license and may be used |
|
28 |
only in accordance with the terms of that license and with the |
|
29 |
inclusion of the above copyright notice. This software may not |
|
30 |
be provided or otherwise made available to, or used by, any |
|
31 |
other person. No title to or ownership of the software is |
|
32 |
hereby transferred. |
|
33 |
" |
|
34 |
! |
|
35 |
||
36 |
documentation |
|
37 |
" |
|
1500
d42e61e53cee
changed osTime to a largeInt, which includes the milliseconds
Claus Gittinger <cg@exept.de>
parents:
1476
diff
changeset
|
38 |
This is an abstract class providing common protocol for Time (time in day) |
d42e61e53cee
changed osTime to a largeInt, which includes the milliseconds
Claus Gittinger <cg@exept.de>
parents:
1476
diff
changeset
|
39 |
and AbsoluteTime (time plus day). |
d42e61e53cee
changed osTime to a largeInt, which includes the milliseconds
Claus Gittinger <cg@exept.de>
parents:
1476
diff
changeset
|
40 |
There are no instances of this class in the system. |
275 | 41 |
It is meant as a home for methods common to time handling classes. |
1282 | 42 |
|
1295 | 43 |
[author:] |
44 |
Claus Gittinger |
|
45 |
||
1282 | 46 |
[See also:] |
47 |
Time Date AbsoluteTime |
|
48 |
Delay ProcessorScheduler |
|
240 | 49 |
" |
50 |
! ! |
|
51 |
||
1500
d42e61e53cee
changed osTime to a largeInt, which includes the milliseconds
Claus Gittinger <cg@exept.de>
parents:
1476
diff
changeset
|
52 |
!AbstractTime class methodsFor:'instance creation'! |
240 | 53 |
|
699 | 54 |
dateAndTimeNow |
1227
e89b39909085
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
699
diff
changeset
|
55 |
"return an array filled with the current date and time. |
e89b39909085
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
699
diff
changeset
|
56 |
See also: Date today / Time now / AbsoluteTime now." |
240 | 57 |
|
699 | 58 |
^ Array with:(Date today) with:(Time now) |
240 | 59 |
|
60 |
" |
|
699 | 61 |
Time dateAndTimeNow |
240 | 62 |
" |
1227
e89b39909085
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
699
diff
changeset
|
63 |
|
e89b39909085
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
699
diff
changeset
|
64 |
"Modified: 19.4.1996 / 15:23:37 / cg" |
275 | 65 |
! |
240 | 66 |
|
1227
e89b39909085
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
699
diff
changeset
|
67 |
now |
e89b39909085
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
699
diff
changeset
|
68 |
"return an instance of myself representing this moment." |
e89b39909085
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
699
diff
changeset
|
69 |
|
1500
d42e61e53cee
changed osTime to a largeInt, which includes the milliseconds
Claus Gittinger <cg@exept.de>
parents:
1476
diff
changeset
|
70 |
^ self basicNew fromOSTime:(OperatingSystem getOSTime) |
1227
e89b39909085
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
699
diff
changeset
|
71 |
|
e89b39909085
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
699
diff
changeset
|
72 |
" |
e89b39909085
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
699
diff
changeset
|
73 |
AbsoluteTime now |
e89b39909085
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
699
diff
changeset
|
74 |
Time now |
e89b39909085
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
699
diff
changeset
|
75 |
" |
e89b39909085
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
699
diff
changeset
|
76 |
|
1500
d42e61e53cee
changed osTime to a largeInt, which includes the milliseconds
Claus Gittinger <cg@exept.de>
parents:
1476
diff
changeset
|
77 |
"Modified: 1.7.1996 / 15:20:10 / cg" |
1227
e89b39909085
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
699
diff
changeset
|
78 |
! ! |
e89b39909085
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
699
diff
changeset
|
79 |
|
1500
d42e61e53cee
changed osTime to a largeInt, which includes the milliseconds
Claus Gittinger <cg@exept.de>
parents:
1476
diff
changeset
|
80 |
!AbstractTime class methodsFor:'ST-80 compatibility'! |
1227
e89b39909085
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
699
diff
changeset
|
81 |
|
e89b39909085
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
699
diff
changeset
|
82 |
totalSeconds |
e89b39909085
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
699
diff
changeset
|
83 |
"returns an internal second clock. Dont interpret the returned |
e89b39909085
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
699
diff
changeset
|
84 |
value - if at all, use it to compute time deltas, by subtracting |
e89b39909085
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
699
diff
changeset
|
85 |
returned values." |
e89b39909085
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
699
diff
changeset
|
86 |
|
e89b39909085
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
699
diff
changeset
|
87 |
^ self secondClock |
e89b39909085
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
699
diff
changeset
|
88 |
! ! |
e89b39909085
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
699
diff
changeset
|
89 |
|
1500
d42e61e53cee
changed osTime to a largeInt, which includes the milliseconds
Claus Gittinger <cg@exept.de>
parents:
1476
diff
changeset
|
90 |
!AbstractTime class methodsFor:'private instance creation'! |
1227
e89b39909085
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
699
diff
changeset
|
91 |
|
275 | 92 |
fromOSTime:osTime |
93 |
"return a time, representing the time given by the operatingSystem time. |
|
94 |
Not meant for public use." |
|
95 |
||
1500
d42e61e53cee
changed osTime to a largeInt, which includes the milliseconds
Claus Gittinger <cg@exept.de>
parents:
1476
diff
changeset
|
96 |
^ self basicNew fromOSTime:osTime. |
418 | 97 |
|
1500
d42e61e53cee
changed osTime to a largeInt, which includes the milliseconds
Claus Gittinger <cg@exept.de>
parents:
1476
diff
changeset
|
98 |
"Modified: 1.7.1996 / 15:09:54 / cg" |
240 | 99 |
! |
100 |
||
699 | 101 |
fromSeconds:seconds |
102 |
"return an instance that is constructed from seconds. |
|
103 |
This method is only allowed for second values as returned by |
|
1227
e89b39909085
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
699
diff
changeset
|
104 |
getSeconds, possibly adding/subtracting to that. |
e89b39909085
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
699
diff
changeset
|
105 |
Never depend on any specific interpretation of the seconds, |
e89b39909085
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
699
diff
changeset
|
106 |
since it depends on how the OperatingSystem counts time |
e89b39909085
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
699
diff
changeset
|
107 |
(some start at 1900, others with 1970 ...)" |
240 | 108 |
|
699 | 109 |
^ self basicNew setSeconds:seconds |
240 | 110 |
|
111 |
" |
|
699 | 112 |
Time fromSeconds:0 should return midnight |
113 |
AbsoluteTime fromSeconds:0 on UNIX: returns 1st. Jan 1970 |
|
1227
e89b39909085
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
699
diff
changeset
|
114 |
on others: dont know |
1500
d42e61e53cee
changed osTime to a largeInt, which includes the milliseconds
Claus Gittinger <cg@exept.de>
parents:
1476
diff
changeset
|
115 |
(AbsoluteTime day:1 month:1 year:1970 hour:1 minutes:0 seconds:0) |
d42e61e53cee
changed osTime to a largeInt, which includes the milliseconds
Claus Gittinger <cg@exept.de>
parents:
1476
diff
changeset
|
116 |
getSeconds on UNIX: returns 0 |
d42e61e53cee
changed osTime to a largeInt, which includes the milliseconds
Claus Gittinger <cg@exept.de>
parents:
1476
diff
changeset
|
117 |
on others: dont know |
699 | 118 |
" |
119 |
||
1500
d42e61e53cee
changed osTime to a largeInt, which includes the milliseconds
Claus Gittinger <cg@exept.de>
parents:
1476
diff
changeset
|
120 |
"Modified: 1.7.1996 / 13:39:30 / cg" |
240 | 121 |
! ! |
122 |
||
1500
d42e61e53cee
changed osTime to a largeInt, which includes the milliseconds
Claus Gittinger <cg@exept.de>
parents:
1476
diff
changeset
|
123 |
!AbstractTime class methodsFor:'queries'! |
275 | 124 |
|
699 | 125 |
millisecondClockValue |
126 |
"return the millisecond clock - since this one overruns |
|
127 |
regularly, use the value only for short timing deltas. |
|
128 |
Also remember that it wraps when compares these values." |
|
275 | 129 |
|
699 | 130 |
^ OperatingSystem getMillisecondTime. |
131 |
||
132 |
" |
|
133 |
Time millisecondClockValue |
|
134 |
" |
|
275 | 135 |
! |
136 |
||
699 | 137 |
secondClock |
138 |
"return seconds of now - for GNU-ST compatibility" |
|
139 |
||
1500
d42e61e53cee
changed osTime to a largeInt, which includes the milliseconds
Claus Gittinger <cg@exept.de>
parents:
1476
diff
changeset
|
140 |
^ OperatingSystem getOSTime // 1000 |
699 | 141 |
|
142 |
" |
|
143 |
AbstractTime secondClock |
|
144 |
" |
|
1500
d42e61e53cee
changed osTime to a largeInt, which includes the milliseconds
Claus Gittinger <cg@exept.de>
parents:
1476
diff
changeset
|
145 |
|
d42e61e53cee
changed osTime to a largeInt, which includes the milliseconds
Claus Gittinger <cg@exept.de>
parents:
1476
diff
changeset
|
146 |
"Modified: 1.7.1996 / 15:20:14 / cg" |
699 | 147 |
! ! |
148 |
||
1500
d42e61e53cee
changed osTime to a largeInt, which includes the milliseconds
Claus Gittinger <cg@exept.de>
parents:
1476
diff
changeset
|
149 |
!AbstractTime class methodsFor:'timing evaluations'! |
275 | 150 |
|
699 | 151 |
millisecondsToRun:aBlock |
152 |
"evaluate the argument, aBlock; return the number of milliseconds it took" |
|
153 |
||
154 |
|startTime endTime| |
|
155 |
||
1476 | 156 |
startTime := OperatingSystem getMillisecondTime. |
699 | 157 |
aBlock value. |
1476 | 158 |
endTime := OperatingSystem getMillisecondTime. |
699 | 159 |
^ endTime - startTime |
160 |
||
161 |
" |
|
162 |
Time millisecondsToRun:[100 factorial] |
|
163 |
" |
|
1476 | 164 |
|
165 |
"Modified: 17.6.1996 / 16:57:37 / cg" |
|
275 | 166 |
! |
167 |
||
699 | 168 |
secondsToRun:aBlock |
169 |
"evaluate the argument, aBlock; return the number of seconds it took" |
|
170 |
||
171 |
|startTime endTime| |
|
360 | 172 |
|
699 | 173 |
startTime := self secondClock. |
174 |
aBlock value. |
|
175 |
endTime := self secondClock. |
|
176 |
^ endTime - startTime |
|
275 | 177 |
|
699 | 178 |
" |
179 |
Time secondsToRun:[1000 factorial] |
|
180 |
" |
|
275 | 181 |
! ! |
182 |
||
183 |
!AbstractTime methodsFor:'accessing'! |
|
184 |
||
185 |
hourInDay |
|
186 |
"return the hours (0..23)" |
|
187 |
||
188 |
^ self hours |
|
189 |
||
190 |
" |
|
191 |
AbsoluteTime now hourInDay |
|
192 |
Time now hourInDay |
|
193 |
" |
|
194 |
! |
|
195 |
||
196 |
minuteInDay |
|
197 |
"return the minutes (0..59)" |
|
198 |
||
199 |
^ self minutes. |
|
200 |
||
201 |
" |
|
202 |
AbsoluteTime now minuteInDay |
|
203 |
Time now minuteInDay |
|
204 |
" |
|
205 |
! |
|
206 |
||
207 |
secondDay |
|
208 |
"return the seconds (0..59)" |
|
209 |
||
210 |
^ self seconds |
|
211 |
||
212 |
" |
|
213 |
AbsoluteTime now secondInDay |
|
214 |
Time now seconds |
|
215 |
" |
|
216 |
! ! |
|
217 |
||
218 |
!AbstractTime methodsFor:'arithmetic'! |
|
219 |
||
220 |
- aTime |
|
221 |
"return the delta in seconds between 2 times." |
|
222 |
||
223 |
^ self getSeconds - (aTime getSeconds) |
|
224 |
||
225 |
" |
|
226 |
|t1 t2| |
|
227 |
||
228 |
t1 := AbsoluteTime now. |
|
229 |
(Delay forSeconds:5) wait. |
|
230 |
t2 := AbsoluteTime now. |
|
231 |
'seconds passed: ' print. (t2 - t1) printNL. |
|
232 |
" |
|
233 |
! |
|
234 |
||
699 | 235 |
addHours:numberOfHours |
236 |
"return a new instance of myself, numberOfHours afterwards." |
|
275 | 237 |
|
699 | 238 |
^ self addSeconds:(numberOfHours * (60 * 60)) |
275 | 239 |
|
240 |
" |
|
241 |
|t| |
|
242 |
||
699 | 243 |
t := AbsoluteTime now. |
244 |
t printNL. |
|
245 |
(t addHours:50) printNL |
|
275 | 246 |
" |
247 |
! |
|
248 |
||
249 |
addMinutes:numberOfMinutes |
|
250 |
"return a new instance of myself, numberOfMinutes afterwards." |
|
251 |
||
252 |
^ self addSeconds:(numberOfMinutes * 60) |
|
253 |
||
254 |
" |
|
255 |
|t| |
|
256 |
||
257 |
t := AbsoluteTime now. t printNL. (t addMinutes:50) printNL |
|
258 |
||
259 |
t := Time now. t printNL. (t addMinutes:50) printNL |
|
260 |
" |
|
261 |
! |
|
262 |
||
699 | 263 |
addSeconds:numberOfSeconds |
264 |
"return a new instance of myself, numberOfSeconds afterwards." |
|
265 |
||
266 |
^ self species basicNew setSeconds:(self getSeconds + numberOfSeconds) |
|
267 |
||
268 |
" |
|
269 |
|t| |
|
270 |
||
271 |
t := AbsoluteTime now. t printNL. (t addSeconds:50) printNL. |
|
275 | 272 |
|
699 | 273 |
t := Time now. t printNL. (t addSeconds:50) printNL |
274 |
" |
|
275 |
! |
|
276 |
||
277 |
addTime:timeAmount |
|
278 |
"return a new instance of myself, timeAmount seconds afterwards. |
|
279 |
AddTime is a bad name - it does not add a time, but expects |
|
280 |
a number. Use any of addSeconds/addHours etc." |
|
281 |
||
282 |
^ self species basicNew setSeconds:(self getSeconds + timeAmount) |
|
283 |
! |
|
284 |
||
285 |
subtractHours:numberOfHours |
|
286 |
"return a new instance of myself, numberOfHours before." |
|
287 |
||
288 |
^ self subtractSeconds:(numberOfHours * (60 * 60)) |
|
275 | 289 |
|
290 |
" |
|
291 |
|t| |
|
292 |
||
293 |
t := AbsoluteTime now. |
|
294 |
t printNL. |
|
699 | 295 |
(t subtractHours:50) printNL |
275 | 296 |
" |
297 |
! |
|
298 |
||
299 |
subtractMinutes:numberOfMinutes |
|
300 |
"return a new instance of myself, numberOfMinutes before." |
|
301 |
||
302 |
^ self subtractSeconds:(numberOfMinutes * 60) |
|
303 |
||
304 |
" |
|
305 |
|t| |
|
306 |
||
307 |
t := AbsoluteTime now. |
|
308 |
t printNL. |
|
309 |
(t subtractMinutes:50) printNL |
|
310 |
" |
|
311 |
! |
|
312 |
||
699 | 313 |
subtractSeconds:numberOfSeconds |
314 |
"return a new instance of myself, numberOfSeconds before." |
|
275 | 315 |
|
699 | 316 |
^ self species basicNew setSeconds:(self getSeconds - numberOfSeconds) |
275 | 317 |
|
318 |
" |
|
319 |
|t| |
|
320 |
||
321 |
t := AbsoluteTime now. |
|
322 |
t printNL. |
|
699 | 323 |
(t subtractSeconds:50) printNL |
275 | 324 |
" |
325 |
! |
|
326 |
||
327 |
subtractTime:timeAmount |
|
328 |
"return a new instance opf myself, timeAmount seconds before myself. |
|
329 |
SubtractTime is a bad name - it does not subtract a time, but expects |
|
330 |
a number. Use any of subtractSeconds/subtractHours etc." |
|
331 |
||
332 |
^ self species basicNew setSeconds:(self getSeconds - timeAmount) |
|
333 |
! ! |
|
334 |
||
699 | 335 |
!AbstractTime methodsFor:'private'! |
240 | 336 |
|
1500
d42e61e53cee
changed osTime to a largeInt, which includes the milliseconds
Claus Gittinger <cg@exept.de>
parents:
1476
diff
changeset
|
337 |
fromOSTime:osTime |
699 | 338 |
"set my time, from operatingSystems time parts" |
240 | 339 |
|
1500
d42e61e53cee
changed osTime to a largeInt, which includes the milliseconds
Claus Gittinger <cg@exept.de>
parents:
1476
diff
changeset
|
340 |
^ self subclassResponsibility |
d42e61e53cee
changed osTime to a largeInt, which includes the milliseconds
Claus Gittinger <cg@exept.de>
parents:
1476
diff
changeset
|
341 |
|
d42e61e53cee
changed osTime to a largeInt, which includes the milliseconds
Claus Gittinger <cg@exept.de>
parents:
1476
diff
changeset
|
342 |
"Modified: 1.7.1996 / 15:09:44 / cg" |
240 | 343 |
! |
344 |
||
699 | 345 |
fromOSTimeTimeLow:lowTime and:hiTime |
346 |
"set my time, from operatingSystems time parts. |
|
347 |
Since I am abstract (not knowing how the time is actually |
|
348 |
represented), this must be done by a concrete class." |
|
349 |
||
350 |
^ self subclassResponsibility |
|
351 |
! |
|
240 | 352 |
|
1500
d42e61e53cee
changed osTime to a largeInt, which includes the milliseconds
Claus Gittinger <cg@exept.de>
parents:
1476
diff
changeset
|
353 |
getMilliseconds |
d42e61e53cee
changed osTime to a largeInt, which includes the milliseconds
Claus Gittinger <cg@exept.de>
parents:
1476
diff
changeset
|
354 |
"get the milliseconds. |
d42e61e53cee
changed osTime to a largeInt, which includes the milliseconds
Claus Gittinger <cg@exept.de>
parents:
1476
diff
changeset
|
355 |
Since I am abstract (not knowing how the time is actually |
d42e61e53cee
changed osTime to a largeInt, which includes the milliseconds
Claus Gittinger <cg@exept.de>
parents:
1476
diff
changeset
|
356 |
represented), this must be done by a concrete class." |
d42e61e53cee
changed osTime to a largeInt, which includes the milliseconds
Claus Gittinger <cg@exept.de>
parents:
1476
diff
changeset
|
357 |
|
d42e61e53cee
changed osTime to a largeInt, which includes the milliseconds
Claus Gittinger <cg@exept.de>
parents:
1476
diff
changeset
|
358 |
^ self subclassResponsibility |
d42e61e53cee
changed osTime to a largeInt, which includes the milliseconds
Claus Gittinger <cg@exept.de>
parents:
1476
diff
changeset
|
359 |
|
d42e61e53cee
changed osTime to a largeInt, which includes the milliseconds
Claus Gittinger <cg@exept.de>
parents:
1476
diff
changeset
|
360 |
"Created: 1.7.1996 / 14:16:49 / cg" |
d42e61e53cee
changed osTime to a largeInt, which includes the milliseconds
Claus Gittinger <cg@exept.de>
parents:
1476
diff
changeset
|
361 |
! |
d42e61e53cee
changed osTime to a largeInt, which includes the milliseconds
Claus Gittinger <cg@exept.de>
parents:
1476
diff
changeset
|
362 |
|
699 | 363 |
getSeconds |
364 |
"get the seconds. |
|
365 |
Since I am abstract (not knowing how the time is actually |
|
366 |
represented), this must be done by a concrete class." |
|
240 | 367 |
|
699 | 368 |
^ self subclassResponsibility |
369 |
! |
|
370 |
||
1500
d42e61e53cee
changed osTime to a largeInt, which includes the milliseconds
Claus Gittinger <cg@exept.de>
parents:
1476
diff
changeset
|
371 |
setMilliseconds:millis |
d42e61e53cee
changed osTime to a largeInt, which includes the milliseconds
Claus Gittinger <cg@exept.de>
parents:
1476
diff
changeset
|
372 |
"set the milliseconds. |
d42e61e53cee
changed osTime to a largeInt, which includes the milliseconds
Claus Gittinger <cg@exept.de>
parents:
1476
diff
changeset
|
373 |
Since I am abstract (not knowing how the time is actually |
d42e61e53cee
changed osTime to a largeInt, which includes the milliseconds
Claus Gittinger <cg@exept.de>
parents:
1476
diff
changeset
|
374 |
represented), this must be done by a concrete class." |
d42e61e53cee
changed osTime to a largeInt, which includes the milliseconds
Claus Gittinger <cg@exept.de>
parents:
1476
diff
changeset
|
375 |
|
d42e61e53cee
changed osTime to a largeInt, which includes the milliseconds
Claus Gittinger <cg@exept.de>
parents:
1476
diff
changeset
|
376 |
^ self subclassResponsibility |
d42e61e53cee
changed osTime to a largeInt, which includes the milliseconds
Claus Gittinger <cg@exept.de>
parents:
1476
diff
changeset
|
377 |
|
d42e61e53cee
changed osTime to a largeInt, which includes the milliseconds
Claus Gittinger <cg@exept.de>
parents:
1476
diff
changeset
|
378 |
"Created: 1.7.1996 / 14:17:00 / cg" |
d42e61e53cee
changed osTime to a largeInt, which includes the milliseconds
Claus Gittinger <cg@exept.de>
parents:
1476
diff
changeset
|
379 |
! |
d42e61e53cee
changed osTime to a largeInt, which includes the milliseconds
Claus Gittinger <cg@exept.de>
parents:
1476
diff
changeset
|
380 |
|
699 | 381 |
setSeconds:secs |
382 |
"set the seconds. |
|
383 |
Since I am abstract (not knowing how the time is actually |
|
384 |
represented), this must be done by a concrete class." |
|
385 |
||
386 |
^ self subclassResponsibility |
|
240 | 387 |
! ! |
388 |
||
1500
d42e61e53cee
changed osTime to a largeInt, which includes the milliseconds
Claus Gittinger <cg@exept.de>
parents:
1476
diff
changeset
|
389 |
!AbstractTime class methodsFor:'documentation'! |
240 | 390 |
|
699 | 391 |
version |
1500
d42e61e53cee
changed osTime to a largeInt, which includes the milliseconds
Claus Gittinger <cg@exept.de>
parents:
1476
diff
changeset
|
392 |
^ '$Header: /cvs/stx/stx/libbasic/Attic/AbstrTime.st,v 1.13 1996-07-01 13:31:33 cg Exp $' |
240 | 393 |
! ! |