Removed delayMult from timing.h
This commit is contained in:
@@ -15,6 +15,7 @@
|
|||||||
* COPYING file distributed with this package.
|
* COPYING file distributed with this package.
|
||||||
*
|
*
|
||||||
* Copyright (c) 2001 Guillaume Filion <gfk@logidac.com>
|
* Copyright (c) 2001 Guillaume Filion <gfk@logidac.com>
|
||||||
|
* 2001 Joris Robijn <joris@robijn.net>
|
||||||
* 2000 Charles Steinkuehler <cstein@newtek.com>
|
* 2000 Charles Steinkuehler <cstein@newtek.com>
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@@ -47,8 +48,6 @@
|
|||||||
# include <time.h>
|
# include <time.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
static int delayMult = 0; // Delay multiplier for slow displays
|
|
||||||
|
|
||||||
/////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////
|
||||||
// Initialisation
|
// Initialisation
|
||||||
//
|
//
|
||||||
@@ -72,7 +71,6 @@ static inline int timing_init() {
|
|||||||
// IO delay to avoid a task switch
|
// IO delay to avoid a task switch
|
||||||
//
|
//
|
||||||
static inline void timing_uPause (int usecs) {
|
static inline void timing_uPause (int usecs) {
|
||||||
int delay = usecs * delayMult; // To correct for slower displays
|
|
||||||
|
|
||||||
#if defined DELAY_GETTIMEOFDAY
|
#if defined DELAY_GETTIMEOFDAY
|
||||||
struct timeval current_time,delay_time,wait_time;
|
struct timeval current_time,delay_time,wait_time;
|
||||||
@@ -82,7 +80,7 @@ static inline void timing_uPause (int usecs) {
|
|||||||
|
|
||||||
// Calculate when delay is over
|
// Calculate when delay is over
|
||||||
delay_time.tv_sec = 0;
|
delay_time.tv_sec = 0;
|
||||||
delay_time.tv_usec = delay;
|
delay_time.tv_usec = usecs;
|
||||||
timeradd(¤t_time,&delay_time,&wait_time);
|
timeradd(¤t_time,&delay_time,&wait_time);
|
||||||
|
|
||||||
do {
|
do {
|
||||||
@@ -93,7 +91,7 @@ static inline void timing_uPause (int usecs) {
|
|||||||
struct timespec delay_time,remaining;
|
struct timespec delay_time,remaining;
|
||||||
|
|
||||||
delay_time.tv_sec = 0;
|
delay_time.tv_sec = 0;
|
||||||
delay_time.tv_nsec = delay * 1000;
|
delay_time.tv_nsec = usecs * 1000;
|
||||||
while ( nanosleep(&delay_time,&remaining) == -1 )
|
while ( nanosleep(&delay_time,&remaining) == -1 )
|
||||||
{
|
{
|
||||||
delay_time.tv_sec = remaining.tv_sec;
|
delay_time.tv_sec = remaining.tv_sec;
|
||||||
@@ -102,7 +100,7 @@ static inline void timing_uPause (int usecs) {
|
|||||||
#else // using I/O timing
|
#else // using I/O timing
|
||||||
// Assuming every port I/O takes 1ms, we'll do at least one.
|
// Assuming every port I/O takes 1ms, we'll do at least one.
|
||||||
int i=0;
|
int i=0;
|
||||||
do { port_in (port); } while (i++ < delay/1000);
|
do { port_in (port); } while (i++ < usecs/1000);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user