Read set BIOS time

From , 4 Years ago, written in C, viewed 50 times.
URL https://pastebin.vip/view/25db67c5
  1. #include <stdio.h>
  2. #include <bios.h>
  3. #include <time.h>
  4. #include <conio.h>
  5.  
  6. int main ( void )
  7. {
  8.         long bios_time;
  9.  
  10.         clrscr();
  11.         cprintf ( "The number of clock ticks since midnight is:\r\n" );
  12.         cprintf ( "The number of seconds since midnight is:\r\n" );
  13.         cprintf ( "The number of minutes since midnight is:\r\n" );
  14.         cprintf ( "The number of hours since midnight is:\r\n" );
  15.         cprintf ( "\r\nPress any key to quit:" );
  16.         while ( !kbhit() )
  17.         {
  18.                 bios_time = biostime ( 0, 0L );
  19.  
  20.                 gotoxy ( 50, 1 );
  21.                 cprintf ( "%lu", bios_time );
  22.  
  23.                 gotoxy ( 50, 2 );
  24.                 cprintf ( "%.4f", bios_time / CLK_TCK );
  25.  
  26.                 gotoxy ( 50, 3 );
  27.                 cprintf ( "%.4f", bios_time / CLK_TCK / 60 );
  28.  
  29.                 gotoxy ( 50, 4 );
  30.                 cprintf ( "%.4f", bios_time / CLK_TCK / 3600 );
  31.         }
  32.         return 0;
  33. }

Reply to "Read set BIOS time"

Here you can reply to the paste above

captcha

https://burned.cc - Burn After Reading Website