Ignore:
Timestamp:
Nov 9, 2003, 2:52:40 PM (16 years ago)
Author:
Sam Hocevar
Message:
  • libee/ee.c: + got rid of DELAY.
  • test/demo.c: + Minor animation effect.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • ttyvaders/trunk/libee/ee.c

    r90 r94  
    3030
    3131#include "ee.h"
     32
     33static int _ee_delay;
    3234
    3335int ee_init(void)
     
    9496
    9597#endif
     98    _ee_delay = 0;
    9699
    97100    return 0;
     101}
     102
     103void ee_set_delay(int delay)
     104{
     105    _ee_delay = delay;
    98106}
    99107
     
    154162}
    155163
    156 #define DELAY 40000
    157164void ee_refresh(void)
    158165{
     
    183190    now = local_time();
    184191
    185     if(now < local_clock + DELAY - 10000)
    186     {
    187         usleep(local_clock + DELAY - 10000 - now);
    188     }
    189 
    190     local_clock += DELAY;
     192    if(now < local_clock + _ee_delay - 10000)
     193    {
     194        usleep(local_clock + _ee_delay - 10000 - now);
     195    }
     196
     197    local_clock += _ee_delay;
    191198}
    192199
Note: See TracChangeset for help on using the changeset viewer.