~ubuntu-branches/ubuntu/quantal/open-vm-tools/quantal-201210021442

« back to all changes in this revision

Viewing changes to lib/eventManager/eventManager.c

  • Committer: Bazaar Package Importer
  • Author(s): Serge Hallyn
  • Date: 2011-03-31 14:20:05 UTC
  • mfrom: (1.4.3 upstream)
  • Revision ID: james.westby@ubuntu.com-20110331142005-3n9red91p7ogkweo
Tags: 2011.03.28-387002-0ubuntu1
* Merge latest upstream git tag.  This has the unlocked_ioctl change
  needed to fix dkms build failures (LP: #727342)
* Changes in debian/rules:
  - work around a bug in toolbox/Makefile, where install-exec-hook is
    not happening.  This needs to get fixed the right way.
  - don't install 'vmware-user' which seems to no longer exist
  - move /etc/xdg into open-vm-toolbox (which should be done using .install)
* debian/open-vm-tools.init: add 'modprobe [-r] vmblock'. (LP: #332323)
* debian/rules and debian/open-vm-toolbox.lintian-overrides:
  - Make vmware-user-suid-wrapper suid-root (LP: #332323)

Show diffs side-by-side

added added

removed removed

Lines of Context:
139
139
   DblLnkLst_Init(&e->l);
140
140
 
141
141
   /*
142
 
    * Most of the event managers I have studied rely on the system time to fire
143
 
    * an event in the future. This is bad, because the system time can be
144
 
    * modified: if you schedule an event to fire in 5 seconds, and then
145
 
    * somebody substract 1 hour (daylight savings?) to the system time, then
146
 
    * your event will actually fire in 1 hour + 5 seconds, which is probably
147
 
    * not what you want... Instead, I use the system uptime, which can not be
148
 
    * modified.
149
 
    *
150
 
    *   --hpreg
 
142
    * Stick to an immutable, monotonically increasing clock.
151
143
    */
152
144
 
153
 
   currentTime = System_Uptime();
 
145
   currentTime = System_GetTimeMonotonic();
154
146
   if (currentTime == -1) {
155
147
      /*
156
148
       * Unable to retrieve the uptime
254
246
      return 0;
255
247
   }
256
248
    
257
 
   currentTime = System_Uptime();
 
249
   currentTime = System_GetTimeMonotonic();
258
250
   if (currentTime == -1) {
259
251
      /*
260
252
       * Unable to retrieve the uptime