[Previous]
[Contents]
[Next]

_strtime()

copy the current time into a given buffer

Synopsis:

#include <time.h>
char *_strtime( char *timestr )

Description:

The _strtime() function copies the current time to the buffer pointed to by timestr. The time is formatted as HH:MM:SS, where

HH
is two digits representing the hour in 24-hour notation
MM
is two digits representing the minutes past the hour
SS
is two digits representing seconds.

The buffer must be at least 9 bytes long.

Returns:

A pointer to the resulting text string timestr.

Examples:

#include <stdio.h>
#include <time.h>

void main()
  {
    char timebuff[9];

    printf( "%s\n", _strtime( timebuff ) );
  }

Classification:

WATCOM

Safety:
Interrupt handler No
Signal handler Yes
Thread Yes

See also:

asctime(), ctime(), gmtime(), localtime(), mktime(), _strdate(), time(), tzset()


[Previous]
[Contents]
[Next]