Eiffel Media API
Overview Cluster Class Classes Index      Previous Next      Top Features

kernel.spec.ise

Class KL_SYSTEM_CLOCK


Direct ancestors

KI_SYSTEM_CLOCK, C_DATE

Known direct descendants

DT_SYSTEM_CLOCK, DT_UTC_SYSTEM_CLOCK

Creation

Features

Invariants

indexing

description

System clocks (precision to the millisecond)

remark

With SmartEiffel under Windows the millisecond part may be stuck to zero.

library

Gobo Eiffel Kernel Library

copyright

Copyright (c) 2001-2004, Eric Bezault and others

license

Eiffel Forum License v2 (see forum.txt)

date

$Date: 2005/07/13 17:05:09 $

revision

$Revision: 1.15 $

class

KL_SYSTEM_CLOCK

inherit

KI_SYSTEM_CLOCK
C_DATE

create

make

-- Create a new system clock.

-- (From KI_SYSTEM_CLOCK)

feature -- Access

day: INTEGER

-- Day

-- (From KI_SYSTEM_CLOCK)

ensure
day_large_enough: Result >= 1
day_small_enough: Result <= 31
hour: INTEGER

-- Hour

-- (From KI_SYSTEM_CLOCK)

ensure
hour_large_enough: Result >= 0
hour_small_enough: Result < 24
is_utc: BOOLEAN

-- Is Current holding value in UTC format?

-- (From C_DATE)

minute: INTEGER

-- Minute

-- (From KI_SYSTEM_CLOCK)

ensure
minute_large_enough: Result >= 0
minute_small_enough: Result < 60
month: INTEGER

-- Month

-- (From KI_SYSTEM_CLOCK)

ensure
month_large_enough: Result >= 1
month_small_enough: Result <= 12
second: INTEGER

-- Second

-- (From KI_SYSTEM_CLOCK)

ensure
second_large_enough: Result >= 0
second_small_enough: Result < 62
year: INTEGER

-- Year

-- (From KI_SYSTEM_CLOCK)

feature -- Setting

set_local_time

-- Set clock to current local time.

-- (From KI_SYSTEM_CLOCK)

set_utc_time

-- Set clock to current UTC time.

-- (From KI_SYSTEM_CLOCK)

feature -- Update

update

-- Pointer to struct tm area.

-- (From C_DATE)

feature -- Status

day_now: INTEGER

-- Current day at creation time or after last call to update.

-- (From C_DATE)

ensure
day_valid: Result >= 1 and Result <= 31
hour_now: INTEGER

-- Current hour at creation time or after last call to update.

-- (From C_DATE)

ensure
hour_valid: Result >= 0 and Result <= 23
millisecond: INTEGER

-- Current millisecond at creation time or after last call to update.

-- (From KI_SYSTEM_CLOCK)

ensure
millisecond_large_enough: Result >= 0
millisecond_small_enough: Result < 999
minute_now: INTEGER

-- Current minute at creation time or after last call to update.

-- (From C_DATE)

ensure
minute_valid: Result >= 0 and Result <= 59
month_now: INTEGER

-- Current month at creation time or after last call to update.

-- (From C_DATE)

ensure
month_valid: Result >= 1 and Result <= 12
second_now: INTEGER

-- Current second at creation time or after last call to update.

-- (From C_DATE)

ensure
second_valid: Result >= 0 and Result <= 59
year_now: INTEGER

-- Current year at creation time or after last call to update.

-- (From C_DATE)

ensure
year_valid: Result >= 1900

invariant


-- From ANY
reflexive_equality: standard_is_equal (Current)
reflexive_conformance: conforms_to (Current)

end