home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Zodiac Super OZ
/
MEDIADEPOT.ISO
/
FILES
/
13
/
N_B_V203.ZIP
/
TIME.TXT
< prev
next >
Wrap
Text File
|
1996-07-04
|
2KB
|
44 lines
$if 0
┌──────────────────────────╖ PowerBASIC v3.20
┌──┤ DASoft ╟──────────────────────┬──────────────────╖
│ ├──────────────────────────╢ Copyright 1995 │ DATE: 1995-10-01 ╟─╖
│ │ FILE NAME TIME .TXT ║ by ╘════════════════─ ║ ║
│ │ ║ Don Schullian, Jr. ║ ║
│ ╘══════════════════════════╝ ║ ║
│ A license is hereby granted to the holder to use this source code in ║ ║
│ any program, commercial or otherwise, without receiving the express ║ ║
│ permission of the copyright holder and without paying any royalties, ║ ║
│ as long as this code is not distributed in any compilable format. ║ ║
│ IE: source code files, PowerBASIC Unit files, and printed listings ║ ║
╘═╤═════════════════════════════════════════════════════════════════════╝ ║
│ .................................... ║
╘═══════════════════════════════════════════════════════════════════════╝
$endif
This package contains 2 different date packing types: a 2byte system
very similar to DOS's style and a 4byte system that stores the actual
seconds contained in a given time. The 2byte system has an accuracy
of 2 seconds as the odd seconds are lost in the packing while the
other system is accurate to the second and can assist in preforming
mathematics against times.
To make things just a bit easier the naming conventions of all the
routines are very standard throughout the package. HMS means Hours,
Minutes, and Seconds while HM is just Hours and Minutes. The word
Time$ refers to a 8 char, 24hour string, HM$ 6 char, 12 hour string,
WORD is for DOS's 2byte system and DWORD is the 4byte system.
Which ever style you choose, the times can be displayed in either
the 12hour or 24hour format and there are routines to allow for
either 6 or 9 character display strings.
Also if you wish to allow the user to select the particular format or
you wish the format to be automatically set by reading the system's
Country Code both are readily available.
Just in case you require a bit more precision than a second, one of the
functions is set to return the 1/100 of a second.