home *** CD-ROM | disk | FTP | other *** search
/ AMOS PD CD / amospdcd.iso / sourcecode / amos_tips / time / time.asc < prev   
Encoding:
Text File  |  1992-03-02  |  607 b   |  28 lines

  1. '************************************* 
  2. '*             Time.AMOS             * 
  3. '*     ©1992 by Volker Stepprath     * 
  4. '*  Shows the actual time of system  * 
  5. '************************************* 
  6. '
  7. '**** Install buffer ****
  8. '
  9. N$=Space$(12)+Chr$(0)
  10. '
  11. '**** Get time of system ****
  12. '
  13. Dreg(1)=Varptr(N$)
  14. XDATESTAMP=Doscall(-192)
  15. '
  16. '**** Calculate and show time **** 
  17. '
  18. H=Leek(Varptr(N$)+4)
  19. S=Leek(Varptr(N$)+8)/50
  20. M=H mod 60
  21. H=H/60
  22. H$="00" : Right$(H$,Len(Str$(H))-1)=Str$(H)-" "
  23. M$="00" : Right$(M$,Len(Str$(M))-1)=Str$(M)-" "
  24. S$="00" : Right$(S$,Len(Str$(S))-1)=Str$(S)-" "
  25. Print H$+":"+M$+":"+S$
  26. '
  27. End 
  28.