Commit 60379bea authored by claes's avatar claes

time_Sleep moved from sutl

parent 78689281
/** /**
* Proview $Id: co_time.c,v 1.6 2005-09-01 14:57:52 claes Exp $ * Proview $Id: co_time.c,v 1.7 2006-01-13 06:41:20 claes Exp $
* Copyright (C) 2005 SSAB Oxelsund AB. * Copyright (C) 2005 SSAB Oxelsund AB.
* *
* This program is free software; you can redistribute it and/or * This program is free software; you can redistribute it and/or
...@@ -944,4 +944,22 @@ time_ZeroD ( ...@@ -944,4 +944,22 @@ time_ZeroD (
return tp; return tp;
} }
void time_Sleep( float time)
{
#ifdef OS_VMS
int sts;
sts = lib$wait(&time);
#elif OS_ELN
LARGE_INTEGER l_time;
l_time.high = -1;
l_time.low = - time * 10000000;
ker$wait_any( NULL, NULL, &l_time);
#elif defined(OS_LYNX) || defined (OS_LINUX)
pwr_tDeltaTime p_time;
time_FloatToD( &p_time, time);
nanosleep( (pwr_tTime *)&p_time, NULL);
#endif
}
/** /**
* Proview $Id: co_time.h,v 1.5 2005-09-01 14:57:52 claes Exp $ * Proview $Id: co_time.h,v 1.6 2006-01-13 06:41:20 claes Exp $
* Copyright (C) 2005 SSAB Oxelsund AB. * Copyright (C) 2005 SSAB Oxelsund AB.
* *
* This program is free software; you can redistribute it and/or * This program is free software; you can redistribute it and/or
...@@ -135,6 +135,7 @@ pwr_tDeltaTime * time_ClockToD (pwr_tStatus*, pwr_tDeltaTime*, time_tClock); ...@@ -135,6 +135,7 @@ pwr_tDeltaTime * time_ClockToD (pwr_tStatus*, pwr_tDeltaTime*, time_tClock);
time_tOs * time_AtoOs (pwr_tStatus*, time_tOs*, pwr_tTime*); time_tOs * time_AtoOs (pwr_tStatus*, time_tOs*, pwr_tTime*);
time_tOs * time_DtoOs (pwr_tStatus*, time_tOs*, pwr_tDeltaTime*); time_tOs * time_DtoOs (pwr_tStatus*, time_tOs*, pwr_tDeltaTime*);
pwr_tDeltaTime * time_ZeroD (pwr_tDeltaTime*); pwr_tDeltaTime * time_ZeroD (pwr_tDeltaTime*);
void time_Sleep (float time);
#if defined(OS_ELN) #if defined(OS_ELN)
int eln_clock_gettime (clockid_t, struct timespec*); int eln_clock_gettime (clockid_t, struct timespec*);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment