~haggai-eran/nux/rtl-rebased

« back to all changes in this revision

Viewing changes to Nux/TimerProc.cpp

  • Committer: Jay Taoko
  • Date: 2011-10-21 23:49:15 UTC
  • mfrom: (508.1.2 nux-20)
  • Revision ID: jay.taoko@canonical.com-20111021234915-hnzakb5ndebica8i
* Removed custom Nux types: t_u32, t_s32, t_bool, ...

Show diffs side-by-side

added added

removed removed

Lines of Context:
42
42
  static bool TimeIsGreater(TimeStruct t1, TimeStruct t2);
43
43
  static void TimeRightNow(TimeStruct *tv);
44
44
  static void Addmillisecs(TimeStruct *tv, unsigned int milliseconds);
45
 
//static t_u32 TimeDiff(TimeStruct t1, TimeStruct t2);
 
45
//static unsigned int TimeDiff(TimeStruct t1, TimeStruct t2);
46
46
 
47
47
  static NThreadSafeCounter TimerUID = 0x01234567;
48
48
 
71
71
    BaseWindow      *Window;                 //!< BaseWindow from where the timer was created.
72
72
    TimerObject     *next;
73
73
    TimerObject     *prev;
74
 
    t_u32           glibid;
75
 
    t_u32           uid;
 
74
    unsigned int           glibid;
 
75
    unsigned int           uid;
76
76
  };
77
77
 
78
78
  TimerObject::TimerObject()
343
343
    return timer_object;
344
344
  }
345
345
 
346
 
  t_u32 TimerHandler::GetNumPendingHandler()
 
346
  unsigned int TimerHandler::GetNumPendingHandler()
347
347
  {
348
 
    t_u32 count = 0;
 
348
    unsigned int count = 0;
349
349
    TimerObject *head = m_timer_object_queue;
350
350
 
351
351
    while (head)
398
398
  }
399
399
 
400
400
#if (defined(NUX_OS_LINUX) || defined(NUX_USE_GLIB_LOOP_ON_WINDOWS)) && (!defined(NUX_DISABLE_GLIB_LOOP))
401
 
  int TimerHandler::ExecTimerHandler(t_u32 timer_id)
 
401
  int TimerHandler::ExecTimerHandler(unsigned int timer_id)
402
402
#else
403
403
  int TimerHandler::ExecTimerHandler()
404
404
#endif
552
552
//     if (m_timer_object_queue && (m_timer_object_queue->glibid == 0))
553
553
//     {
554
554
//         // How long(in milliseconds) between now and the moment the timeout expires?
555
 
//         t_u32 time_difference = TimeDiff(now, m_timer_object_queue->when);
 
555
//         unsigned int time_difference = TimeDiff(now, m_timer_object_queue->when);
556
556
//
557
557
//         m_timer_object_queue->glibid = GetWindowThread()->AddGLibTimeout(time_difference);
558
558
//         //nuxDebugMsg("[TimerHandler::ExecTimerHandler] Adding Timeout ID: %d", m_timer_object_queue->glibid);
650
650
    }
651
651
  }
652
652
 
653
 
  /*t_u32 TimeDiff( TimeStruct t1, TimeStruct t2)
 
653
  /*unsigned int TimeDiff( TimeStruct t1, TimeStruct t2)
654
654
  {
655
 
      t_s32 sec;
656
 
      t_s32 usec;
 
655
      int sec;
 
656
      int usec;
657
657
      if (t1.sec >= t2.sec)
658
658
      {
659
659
          sec = t1.sec - t2.sec;