home *** CD-ROM | disk | FTP | other *** search
- @node _dos_settime, dos
- @subheading Syntax
-
- @example
- #include <dos.h>
-
- void _dos_settime(struct dostime_t *time);
- @end example
-
- @subheading Description
-
- This function sets the current time. The @var{time} structure
- is as follows:
-
- @example
- struct dostime_t @{
- unsigned char hour; /* 0-23 */
- unsigned char minute; /* 0-59 */
- unsigned char second; /* 0-59 */
- unsigned char hsecond; /* 0-99 */
- @};
- @end example
-
- @xref{_dos_gettime}. @xref{_dos_getdate}. @xref{_dos_setdate}.
-
- @subheading Return Value
-
- Returns 0 if successful and non-zero on error (and sets @var{errno}=EINVAL).
-
- @subheading Example
-
- @example
- struct dostime_t time;
-
- time->hour = 23;
- time->minute = 59;
- time->second = 59;
- time->hsecond = 99;
- if ( !_dos_settime(&time) )
- puts("It was a valid time.");
- @end example
-