diff options
Diffstat (limited to 'lib')
| -rw-r--r-- | lib/CopyJob.cc | 14 | 
1 files changed, 13 insertions, 1 deletions
diff --git a/lib/CopyJob.cc b/lib/CopyJob.cc index 329dd63..2554654 100644 --- a/lib/CopyJob.cc +++ b/lib/CopyJob.cc @@ -4,10 +4,16 @@  #include "gettext.h"  #include "CopyJob.h" -CopyJob::CopyJob(Handle * as, Handle * ad, ssize_t asiz, bool ads, bool add) : s(as), d(ad), ds(ads), dd(add), siz(asiz), cursiz(0), r(0), w(0), tw(0) { +CopyJob::CopyJob(Handle * as, Handle * ad, ssize_t asiz, bool ads, bool add, int ashape) : s(as), d(ad), ds(ads), dd(add), siz(asiz), cursiz(0), r(0), w(0), tw(0), shape(ashape) { +    struct timezone tz; +      s->SetNonBlock();      d->SetNonBlock();      WaitFor(s, W4_READING); +     +    if (shape > 0) { +	gettimeofday(&start, &tz); +    }  }  CopyJob::~CopyJob() { @@ -22,6 +28,12 @@ CopyJob::~CopyJob() {  int CopyJob::Do() throw (GeneralException) {      int tr; +    struct timeval now; +    struct timezone tz; +     +    if (shape > 0) { +	gettimeofday(&now, &tz); +    }      switch (current) {      case 0:  | 
