delorie.com/djgpp/doc/libc/libc_182.html   search  
libc.a reference

[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

_dos_settime

Syntax

 
#include <dos.h>

void _dos_settime(struct dostime_t *time);

Description

This function sets the current time. The time structure is as follows:

 
struct dostime_t {
  unsigned char hour;     /* 0-23 */
  unsigned char minute;   /* 0-59 */
  unsigned char second;   /* 0-59 */
  unsigned char hsecond;  /* 0-99 */
};

See section _dos_gettime. See section _dos_getdate. See section _dos_setdate.

Return Value

Returns 0 if successful and non-zero on error (and sets errno=EINVAL).

Portability

ANSI/ISO C No
POSIX No

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.");

  webmaster     delorie software   privacy  
  Copyright © 2004     Updated Apr 2004