[Overview][Constants][Types][Procedures and functions][Variables][Index] | Reference for unit 'oldlinux' (#rtl)

# GetTime

Return current system time

## Declaration

Source position: line 0

`procedure GetTime(`
`var hour: Word;`
`var min: Word;`
`var sec: Word;`
`var msec: Word;`
`var usec: Word`
`); procedure GetTime(`
`var hour: Word;`
`var min: Word;`
`var sec: Word;`
`var sec100: Word`
`); procedure GetTime(`
`var hour: Word;`
`var min: Word;`
`var sec: Word`
`);`

## Description

Returns the current time of the day, adjusted to local time. Upon return, the parameters are filled with

hour
  Hours since 00:00 today.
min
  minutes in current hour.
sec
  seconds in current minute.
sec100
  hundreds of seconds in current second.
msec
  milliseconds in current second.
usec
  microseconds in current second.

## Errors

None

## See also

GetEpochTime |  | Return the current unix time
GetDate |  | Return the system date
GetDateTime |  | Return system date and time
EpochToLocal |  | Convert epoch time to local time

## Example

    Program Example5;

    { Program to demonstrate the GetTime function. }

    Uses oldlinux;

    Var Hour, Minute, Second : Word;

    begin
      GetTime (Hour, Minute, Second);
      Writeln ('Time : ',Hour:2,':',Minute:2,':',Second:2);
    end.

Documentation generated on: Feb 26 2014