timer and timeStamp added to misc. copyright and license info added

This commit is contained in:
Marty Kraimer
2010-11-23 07:30:13 -05:00
parent 28aad96b34
commit 9db054cc54
100 changed files with 1376 additions and 7236 deletions

View File

@@ -1,4 +1,9 @@
/* timeFunction.cpp */
/**
* Copyright - See the COPYRIGHT that is included with this distribution.
* EPICS pvDataCPP is distributed subject to a Software License Agreement found
* in file LICENSE that is included with this distribution.
*/
#include "noDefaultMethods.h"
#include "pvType.h"
#include "timeStamp.h"
@@ -27,15 +32,15 @@ TimeFunction::~TimeFunction() {}
double TimeFunction::timeCall()
{
TimeStamp startTime(0,0);
TimeStamp endTime(0,0);
TimeStamp startTime;
TimeStamp endTime;
double perCall = 0.0;
long ntimes = 1;
while(true) {
startTime.getCurrent();
for(long i=0; i<ntimes; i++) requester->function();
endTime.getCurrent();
double diff = TimeStamp::diffInSeconds(&endTime,&startTime);
double diff = TimeStamp::diff(endTime,startTime);
if(diff>=1.0) {
perCall = diff/(double)ntimes;
break;