Back: TextCollector-storing Up: Base classes Forward: Time class-basic (UTC)   Top: GNU Smalltalk Library Reference Contents: Table of Contents Index: Class index About: About this document

1.190 Time

Defined in namespace Smalltalk
Superclass: Magnitude
Category: Language-Data types
My instances represent times of the day. I provide methods for instance creation, methods that access components (hours, minutes, and seconds) of a time value, and a block execution timing facility.

1.190.1 Time class: basic (UTC)  (class)
1.190.2 Time class: builtins  (class)
1.190.3 Time class: clocks  (class)
1.190.4 Time class: initialization  (class)
1.190.5 Time class: instance creation  (class)
1.190.6 Time: accessing (ANSI for DateAndTimes)  (instance)
1.190.7 Time: accessing (non ANSI & for Durations)  (instance)
1.190.8 Time: arithmetic  (instance)
1.190.9 Time: comparing  (instance)


1.190.1 Time class: basic (UTC)

midnight
Answer a time representing midnight in Coordinated Universal Time (UTC)

utcNow
Answer a time representing the current time of day in Coordinated Universal Time (UTC)

utcSecondClock
Answer the number of seconds since the midnight of 1/1/1901 (unlike #secondClock, the reference time is here expressed as UTC, that is as Coordinated Universal Time).


1.190.2 Time class: builtins

primMillisecondClock
Returns the number of milliseconds since midnight.

primSecondClock
Returns the number of seconds to/from 1/1/2000.

timezone
Answer a String associated with the current timezone (either standard or daylight-saving) on this operating system. For example, the answer could be `EST' to indicate Eastern Standard Time; the answer can be empty and can't be assumed to be a three-character code such as `EST'.

timezoneBias
Specifies the current bias, in minutes, for local time translation for the current time. The bias is the difference, in seconds, between Coordinated Universal Time (UTC) and local time; a positive bias indicates that the local timezone is to the east of Greenwich (e.g. Europe, Asia), while a negative bias indicates that it is to the west (e.g. America)


1.190.3 Time class: clocks

millisecondClock
Answer the number of milliseconds since startup.

millisecondClockValue
Answer the number of milliseconds since startup

millisecondsPerDay
Answer the number of milliseconds in a day

millisecondsToRun: timedBlock
Answer the number of milliseconds which timedBlock took to run

secondClock
Answer the number of seconds since the midnight of 1/1/1901


1.190.4 Time class: initialization

initialize
Initialize the Time class after the image has been bootstrapped

update: aspect
Private - Initialize the receiver's instance variables


1.190.5 Time class: instance creation

fromSeconds: secondCount
Answer a Time representing secondCount seconds past midnight

hours: h
Answer a Time that is the given number of hours past midnight

hours: h minutes: m seconds: s
Answer a Time that is the given number of hours, minutes and seconds past midnight

minutes: m
Answer a Time that is the given number of minutes past midnight

new
Answer a Time representing midnight

now
Answer a time representing the current time of day

readFrom: aStream
Parse an instance of the receiver (hours/minutes/seconds) from aStream

seconds: s
Answer a Time that is the given number of seconds past midnight


1.190.6 Time: accessing (ANSI for DateAndTimes)

hour
Answer the number of hours in the receiver

hour12
Answer the hour in a 12-hour clock

hour24
Answer the hour in a 24-hour clock

minute
Answer the number of minutes in the receiver

second
Answer the number of seconds in the receiver


1.190.7 Time: accessing (non ANSI & for Durations)

asSeconds
Answer `seconds'.

hours
Answer the number of hours in the receiver

minutes
Answer the number of minutes in the receiver

seconds
Answer the number of seconds in the receiver


1.190.8 Time: arithmetic

addSeconds: timeAmount
Answer a new Time that is timeAmount seconds after the receiver

addTime: timeAmount
Answer a new Time that is timeAmount seconds after the receiver; timeAmount is a Time.

printOn: aStream
Print a representation of the receiver on aStream

subtractTime: timeAmount
Answer a new Time that is timeAmount seconds before the receiver; timeAmount is a Time.


1.190.9 Time: comparing

< aTime
Answer whether the receiver is less than aTime

= aTime
Answer whether the receiver is equal to aTime

hash
Answer an hash value for the receiver



Back: Time-arithmetic Up: Time Forward: True   Top: GNU Smalltalk Library Reference Contents: Table of Contents Index: Class index About: About this document


This document was generated on May, 22 2008 using texi2html