author | Claus Gittinger <cg@exept.de> |
Fri, 08 May 1998 12:29:18 +0200 | |
changeset 3425 | f7faef75f0d8 |
parent 2310 | 2cb1366e0eb3 |
child 3476 | f2ebb76a952d |
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 |
||
2310
2cb1366e0eb3
Correct name: #secondDay --> #secondInDay.
Stefan Vogel <sv@exept.de>
parents:
1500
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 |
||
2310
2cb1366e0eb3
Correct name: #secondDay --> #secondInDay.
Stefan Vogel <sv@exept.de>
parents:
1500
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 |
|
2310
2cb1366e0eb3
Correct name: #secondDay --> #secondInDay.
Stefan Vogel <sv@exept.de>
parents:
1500
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 |
|
2310
2cb1366e0eb3
Correct name: #secondDay --> #secondInDay.
Stefan Vogel <sv@exept.de>
parents:
1500
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 |
||
2310
2cb1366e0eb3
Correct name: #secondDay --> #secondInDay.
Stefan Vogel <sv@exept.de>
parents:
1500
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 |
||
2310
2cb1366e0eb3
Correct name: #secondDay --> #secondInDay.
Stefan Vogel <sv@exept.de>
parents:
1500
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 |
||
2310
2cb1366e0eb3
Correct name: #secondDay --> #secondInDay.
Stefan Vogel <sv@exept.de>
parents:
1500
diff
changeset
|
207 |
secondInDay |
275 | 208 |
"return the seconds (0..59)" |
209 |
||
210 |
^ self seconds |
|
211 |
||
212 |
" |
|
213 |
AbsoluteTime now secondInDay |
|
214 |
Time now seconds |
|
215 |
" |
|
2310
2cb1366e0eb3
Correct name: #secondDay --> #secondInDay.
Stefan Vogel <sv@exept.de>
parents:
1500
diff
changeset
|
216 |
|
2cb1366e0eb3
Correct name: #secondDay --> #secondInDay.
Stefan Vogel <sv@exept.de>
parents:
1500
diff
changeset
|
217 |
"Created: 22.10.1996 / 09:27:47 / stefan" |
275 | 218 |
! ! |
219 |
||
220 |
!AbstractTime methodsFor:'arithmetic'! |
|
221 |
||
222 |
- aTime |
|
223 |
"return the delta in seconds between 2 times." |
|
224 |
||
225 |
^ self getSeconds - (aTime getSeconds) |
|
226 |
||
227 |
" |
|
228 |
|t1 t2| |
|
229 |
||
230 |
t1 := AbsoluteTime now. |
|
231 |
(Delay forSeconds:5) wait. |
|
232 |
t2 := AbsoluteTime now. |
|
233 |
'seconds passed: ' print. (t2 - t1) printNL. |
|
234 |
" |
|
235 |
! |
|
236 |
||
699 | 237 |
addHours:numberOfHours |
238 |
"return a new instance of myself, numberOfHours afterwards." |
|
275 | 239 |
|
699 | 240 |
^ self addSeconds:(numberOfHours * (60 * 60)) |
275 | 241 |
|
242 |
" |
|
243 |
|t| |
|
244 |
||
699 | 245 |
t := AbsoluteTime now. |
246 |
t printNL. |
|
247 |
(t addHours:50) printNL |
|
275 | 248 |
" |
249 |
! |
|
250 |
||
251 |
addMinutes:numberOfMinutes |
|
252 |
"return a new instance of myself, numberOfMinutes afterwards." |
|
253 |
||
254 |
^ self addSeconds:(numberOfMinutes * 60) |
|
255 |
||
256 |
" |
|
257 |
|t| |
|
258 |
||
259 |
t := AbsoluteTime now. t printNL. (t addMinutes:50) printNL |
|
260 |
||
261 |
t := Time now. t printNL. (t addMinutes:50) printNL |
|
262 |
" |
|
263 |
! |
|
264 |
||
699 | 265 |
addSeconds:numberOfSeconds |
266 |
"return a new instance of myself, numberOfSeconds afterwards." |
|
267 |
||
268 |
^ self species basicNew setSeconds:(self getSeconds + numberOfSeconds) |
|
269 |
||
270 |
" |
|
271 |
|t| |
|
272 |
||
273 |
t := AbsoluteTime now. t printNL. (t addSeconds:50) printNL. |
|
275 | 274 |
|
699 | 275 |
t := Time now. t printNL. (t addSeconds:50) printNL |
276 |
" |
|
277 |
! |
|
278 |
||
279 |
addTime:timeAmount |
|
280 |
"return a new instance of myself, timeAmount seconds afterwards. |
|
281 |
AddTime is a bad name - it does not add a time, but expects |
|
282 |
a number. Use any of addSeconds/addHours etc." |
|
283 |
||
284 |
^ self species basicNew setSeconds:(self getSeconds + timeAmount) |
|
285 |
! |
|
286 |
||
287 |
subtractHours:numberOfHours |
|
288 |
"return a new instance of myself, numberOfHours before." |
|
289 |
||
290 |
^ self subtractSeconds:(numberOfHours * (60 * 60)) |
|
275 | 291 |
|
292 |
" |
|
293 |
|t| |
|
294 |
||
295 |
t := AbsoluteTime now. |
|
296 |
t printNL. |
|
699 | 297 |
(t subtractHours:50) printNL |
275 | 298 |
" |
299 |
! |
|
300 |
||
301 |
subtractMinutes:numberOfMinutes |
|
302 |
"return a new instance of myself, numberOfMinutes before." |
|
303 |
||
304 |
^ self subtractSeconds:(numberOfMinutes * 60) |
|
305 |
||
306 |
" |
|
307 |
|t| |
|
308 |
||
309 |
t := AbsoluteTime now. |
|
310 |
t printNL. |
|
311 |
(t subtractMinutes:50) printNL |
|
312 |
" |
|
313 |
! |
|
314 |
||
699 | 315 |
subtractSeconds:numberOfSeconds |
316 |
"return a new instance of myself, numberOfSeconds before." |
|
275 | 317 |
|
699 | 318 |
^ self species basicNew setSeconds:(self getSeconds - numberOfSeconds) |
275 | 319 |
|
320 |
" |
|
321 |
|t| |
|
322 |
||
323 |
t := AbsoluteTime now. |
|
324 |
t printNL. |
|
699 | 325 |
(t subtractSeconds:50) printNL |
275 | 326 |
" |
327 |
! |
|
328 |
||
329 |
subtractTime:timeAmount |
|
330 |
"return a new instance opf myself, timeAmount seconds before myself. |
|
331 |
SubtractTime is a bad name - it does not subtract a time, but expects |
|
332 |
a number. Use any of subtractSeconds/subtractHours etc." |
|
333 |
||
334 |
^ self species basicNew setSeconds:(self getSeconds - timeAmount) |
|
335 |
! ! |
|
336 |
||
699 | 337 |
!AbstractTime methodsFor:'private'! |
240 | 338 |
|
1500
d42e61e53cee
changed osTime to a largeInt, which includes the milliseconds
Claus Gittinger <cg@exept.de>
parents:
1476
diff
changeset
|
339 |
fromOSTime:osTime |
699 | 340 |
"set my time, from operatingSystems time parts" |
240 | 341 |
|
1500
d42e61e53cee
changed osTime to a largeInt, which includes the milliseconds
Claus Gittinger <cg@exept.de>
parents:
1476
diff
changeset
|
342 |
^ self subclassResponsibility |
d42e61e53cee
changed osTime to a largeInt, which includes the milliseconds
Claus Gittinger <cg@exept.de>
parents:
1476
diff
changeset
|
343 |
|
d42e61e53cee
changed osTime to a largeInt, which includes the milliseconds
Claus Gittinger <cg@exept.de>
parents:
1476
diff
changeset
|
344 |
"Modified: 1.7.1996 / 15:09:44 / cg" |
240 | 345 |
! |
346 |
||
1500
d42e61e53cee
changed osTime to a largeInt, which includes the milliseconds
Claus Gittinger <cg@exept.de>
parents:
1476
diff
changeset
|
347 |
getMilliseconds |
d42e61e53cee
changed osTime to a largeInt, which includes the milliseconds
Claus Gittinger <cg@exept.de>
parents:
1476
diff
changeset
|
348 |
"get the milliseconds. |
d42e61e53cee
changed osTime to a largeInt, which includes the milliseconds
Claus Gittinger <cg@exept.de>
parents:
1476
diff
changeset
|
349 |
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
|
350 |
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
|
351 |
|
d42e61e53cee
changed osTime to a largeInt, which includes the milliseconds
Claus Gittinger <cg@exept.de>
parents:
1476
diff
changeset
|
352 |
^ self subclassResponsibility |
d42e61e53cee
changed osTime to a largeInt, which includes the milliseconds
Claus Gittinger <cg@exept.de>
parents:
1476
diff
changeset
|
353 |
|
d42e61e53cee
changed osTime to a largeInt, which includes the milliseconds
Claus Gittinger <cg@exept.de>
parents:
1476
diff
changeset
|
354 |
"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
|
355 |
! |
d42e61e53cee
changed osTime to a largeInt, which includes the milliseconds
Claus Gittinger <cg@exept.de>
parents:
1476
diff
changeset
|
356 |
|
699 | 357 |
getSeconds |
358 |
"get the seconds. |
|
359 |
Since I am abstract (not knowing how the time is actually |
|
360 |
represented), this must be done by a concrete class." |
|
240 | 361 |
|
699 | 362 |
^ self subclassResponsibility |
363 |
! |
|
364 |
||
1500
d42e61e53cee
changed osTime to a largeInt, which includes the milliseconds
Claus Gittinger <cg@exept.de>
parents:
1476
diff
changeset
|
365 |
setMilliseconds:millis |
d42e61e53cee
changed osTime to a largeInt, which includes the milliseconds
Claus Gittinger <cg@exept.de>
parents:
1476
diff
changeset
|
366 |
"set the milliseconds. |
d42e61e53cee
changed osTime to a largeInt, which includes the milliseconds
Claus Gittinger <cg@exept.de>
parents:
1476
diff
changeset
|
367 |
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
|
368 |
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
|
369 |
|
d42e61e53cee
changed osTime to a largeInt, which includes the milliseconds
Claus Gittinger <cg@exept.de>
parents:
1476
diff
changeset
|
370 |
^ self subclassResponsibility |
d42e61e53cee
changed osTime to a largeInt, which includes the milliseconds
Claus Gittinger <cg@exept.de>
parents:
1476
diff
changeset
|
371 |
|
d42e61e53cee
changed osTime to a largeInt, which includes the milliseconds
Claus Gittinger <cg@exept.de>
parents:
1476
diff
changeset
|
372 |
"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
|
373 |
! |
d42e61e53cee
changed osTime to a largeInt, which includes the milliseconds
Claus Gittinger <cg@exept.de>
parents:
1476
diff
changeset
|
374 |
|
699 | 375 |
setSeconds:secs |
376 |
"set the seconds. |
|
377 |
Since I am abstract (not knowing how the time is actually |
|
378 |
represented), this must be done by a concrete class." |
|
379 |
||
380 |
^ self subclassResponsibility |
|
240 | 381 |
! ! |
382 |
||
2310
2cb1366e0eb3
Correct name: #secondDay --> #secondInDay.
Stefan Vogel <sv@exept.de>
parents:
1500
diff
changeset
|
383 |
!AbstractTime class methodsFor:'documentation'! |
240 | 384 |
|
699 | 385 |
version |
2310
2cb1366e0eb3
Correct name: #secondDay --> #secondInDay.
Stefan Vogel <sv@exept.de>
parents:
1500
diff
changeset
|
386 |
^ '$Header: /cvs/stx/stx/libbasic/AbstractTime.st,v 1.14 1997-01-29 18:01:17 stefan Exp $' |
240 | 387 |
! ! |