copy the current time into a given buffer
#include <time.h> char *_strtime( char *timestr )
The _strtime() function copies the current time to the buffer pointed to by timestr. The time is formatted as HH:MM:SS, where
The buffer must be at least 9 bytes long.
A pointer to the resulting text string timestr.
#include <stdio.h>
#include <time.h>
void main()
{
char timebuff[9];
printf( "%s\n", _strtime( timebuff ) );
}
WATCOM
| Safety: | |
|---|---|
| Interrupt handler | No |
| Signal handler | Yes |
| Thread | Yes |
asctime(), ctime(), gmtime(), localtime(), mktime(), _strdate(), time(), tzset()