home *** CD-ROM | disk | FTP | other *** search
/ PC Extra Super CD 1998 January / PCPLUS131.iso / DJGPP / V2 / DJLSR201.ZIP / src / libc / dos / compat / d_settim.txh < prev    next >
Encoding:
Text File  |  1995-10-09  |  842 b   |  42 lines

  1. @node _dos_settime, dos
  2. @subheading Syntax
  3.  
  4. @example
  5. #include <dos.h>
  6.  
  7. void _dos_settime(struct dostime_t *time);
  8. @end example
  9.  
  10. @subheading Description
  11.  
  12. This function sets the current time. The @var{time} structure
  13. is as follows:
  14.  
  15. @example
  16. struct dostime_t @{
  17.   unsigned char hour;     /* 0-23 */
  18.   unsigned char minute;   /* 0-59 */
  19.   unsigned char second;   /* 0-59 */
  20.   unsigned char hsecond;  /* 0-99 */
  21. @};
  22. @end example
  23.  
  24. @xref{_dos_gettime}. @xref{_dos_getdate}. @xref{_dos_setdate}.
  25.  
  26. @subheading Return Value
  27.  
  28. Returns 0 if successful and non-zero on error (and sets @var{errno}=EINVAL).
  29.  
  30. @subheading Example
  31.  
  32. @example
  33. struct dostime_t time;
  34.  
  35. time->hour    = 23;
  36. time->minute  = 59;
  37. time->second  = 59;
  38. time->hsecond = 99;
  39. if ( !_dos_settime(&time) )
  40.   puts("It was a valid time.");
  41. @end example
  42.