summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorpixel <pixel>2003-01-28 17:36:57 +0000
committerpixel <pixel>2003-01-28 17:36:57 +0000
commitbab663b9012d3dc2be6afe930cb7193957404307 (patch)
tree7470a903c047f00050bd3a72251d6664695dfbaf /lib
parent715e5efccac0144c48a2f8ae0c8b959506f74a9f (diff)
Commit of the day.
Diffstat (limited to 'lib')
-rw-r--r--lib/CopyJob.cc14
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: