Sorry.
Previous message had wrong periodicTask code. Here's what I meant to send.
Jack, can you try this and see if it fixes the problem that you were seeing/
static void periodicTask(void *arg)
{
periodic_scan_list *ppsl = (periodic_scan_list *)arg;
epicsTimeStamp nextScan, now;
double delay;
taskwdInsert(0, NULL, NULL);
epicsEventSignal(startStopEvent);
epicsTimeGetCurrent(&nextScan);
while (ppsl->scanCtl != ctlExit) {
if (ppsl->scanCtl == ctlRun) scanList(&ppsl->scan_list);
epicsTimeAddSeconds(&nextScan, ppsl->period);
epicsTimeGetCurrent(&now);
delay = epicsTimeDiffInSeconds(&nextScan, &now);
if (delay <= 0.0) {
ppsl->overrunCount++;
delay = 0.02;
epicsTimeGetCurrent(&nextScan);
}
epicsEventWaitWithTimeout(ppsl->loopEvent, delay);
}
taskwdRemove(0);
epicsEventSignal(startStopEvent);
}
--
Eric Norum
[email protected]
- Replies:
- Re: time drift in camonitor timestamps Andrew Johnson
- References:
- time drift in camonitor timestamps ibadillo
- RE: time drift in camonitor timestamps Mark Rivers
- Re: time drift in camonitor timestamps Michael Davidsaver
- Re: time drift in camonitor timestamps inari badillo
- Re: time drift in camonitor timestamps Ralph Lange
- Re: time drift in camonitor timestamps Eric Norum
- Re: time drift in camonitor timestamps Jack Smith
- Navigate by Date:
- Prev:
Re: time drift in camonitor timestamps Eric Norum
- Next:
Re: What's calling get_array_info? Michael Davidsaver
- Index:
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
<2013>
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
- Navigate by Thread:
- Prev:
Re: time drift in camonitor timestamps Eric Norum
- Next:
Re: time drift in camonitor timestamps Andrew Johnson
- Index:
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
<2013>
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
|