Advertisement
Guest User

Untitled

a guest
Oct 31st, 2014
214
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.37 KB | None | 0 0
  1. #include "MacroInit.h"
  2. #include <time.h>
  3. void Macro_main(IN *p)
  4. {
  5.  MarcoInit
  6.  
  7.     static int oldtime = 0;
  8.  
  9.     time_t newtime = time(NULL);
  10.  
  11.     if(LocalBit[1])
  12.     {
  13.         LocalWord[0] += newtime-oldtime; //общий счётчик секунд
  14.     }
  15.    
  16.     oldtime = newtime;
  17.  
  18.     LocalWord[1] = LocalWord[0] / 60; //минуты
  19.     LocalWord[2] = LocalWord[0] % 60; //секунды
  20. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement