indexing
	description: "Values of time"
	status: "See notice at end of class"
	date: "$Date$"
	revision: "$Revision$"
	access: time

class interface
	TIME_VALUE

feature -- Access

	compact_time: INTEGER
			-- Hour, minute, second coded.

	fine_second: DOUBLE
			-- Representation of second with decimals

	fractional_second: DOUBLE
			-- Fractional part of fine_second

	hour: INTEGER
			-- Hour of the current time

	Hours_in_day: INTEGER is 24
			-- Number of hours in a day
			-- (from TIME_CONSTANTS)

	micro_second: INTEGER
			-- Microsecond of the current time

	milli_second: INTEGER
			-- Millisecond of the current time

	minute: INTEGER
			-- Minute of the current time

	Minutes_in_hour: INTEGER is 60
			-- Number of minutes in an hour
			-- (from TIME_CONSTANTS)

	nano_second: INTEGER
			-- Nanosecond of the current time

	second: INTEGER
			-- Second of the current time

	Seconds_in_day: INTEGER is 86400
			-- Number of seconds in an hour
			-- (from TIME_CONSTANTS)

	Seconds_in_hour: INTEGER is 3600
			-- Number of seconds in an hour
			-- (from TIME_CONSTANTS)

	Seconds_in_minute: INTEGER is 60
			-- Number of seconds in a minute
			-- (from TIME_CONSTANTS)

	time_default_format_string: STRING
			-- Default output format for times
			-- (from TIME_CONSTANTS)
	
feature -- Element change

	set_fine_second (s: DOUBLE)
			-- Set fine_second to s
		require -- from TIME_MEASUREMENT
			s_large_enough: s >= 0
			s_small_enough: s < seconds_in_minute
		ensure -- from TIME_MEASUREMENT
			fine_second_set: fine_second = s

	set_fractionals (f: DOUBLE)
			-- Set fractional_second to f.
		require -- from TIME_MEASUREMENT
			f_large_enough: f >= 0
			f_small_enough: f < 1
		ensure -- from TIME_MEASUREMENT
			second_same: second = old second

	set_hour (h: INTEGER)
			-- Set hour to h.
		require -- from TIME_MEASUREMENT
			h_large_enough: h >= 0
			h_small_enough: h < hours_in_day
		ensure -- from TIME_MEASUREMENT
			hour_set: hour = h

	set_minute (m: INTEGER)
			-- Set minute to m.
		require -- from TIME_MEASUREMENT
			m_large_enough: m >= 0
			m_small_enough: m < minutes_in_hour
		ensure -- from TIME_MEASUREMENT
			minute_set: minute = m

	set_second (s: INTEGER)
			-- Set second to s.
		require -- from TIME_MEASUREMENT
			s_large_enough: s >= 0
			s_small_enough: s < seconds_in_minute
		ensure -- from TIME_MEASUREMENT
			second_set: second = s
	
invariant

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

end -- class TIME_VALUE