GetTime

Availability All terminals
Description This function fills in the time structure with the current time as stored in the terminal's real-time clock.
Syntax void GetTime( struct time *timep );
Arguments
struct time *timep
The time structure is defined as follows:
struct time
{
    unsigned char ti_hour;  // hours
    unsigned char ti_min;   // minutes
    unsigned char ti_sec;   // seconds
};
Returns The function fills in the structure, but has no return value.
Remarks The time can be set with the SetTime() function.
Example
// GetDate() / GetTime() example

#include <stdio.h>
#include "lib.h"

void main( void )
{
    struct date d;
    struct time t;

    for(;;)
    {
        GetDate( &d );
        GetTime( &t );
        printf("\n%02d:%02d:%02d", t.ti_hour, t.ti_min, t.ti_sec);
        printf(" %02d/%02d/%04d", d.da_day, d.da_mon, d.da_year);
        Delay( 50 );
    }
}