git.samba.org
/
kai
/
samba.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
fc67675
)
s3: use monotonic clock for time deltas in smbtar
author
Björn Jacke
<bj@sernet.de>
Mon, 30 Aug 2010 13:44:54 +0000
(15:44 +0200)
committer
Björn Jacke
<bj@sernet.de>
Tue, 31 Aug 2010 08:26:09 +0000
(10:26 +0200)
source3/client/clitar.c
patch
|
blob
|
history
diff --git
a/source3/client/clitar.c
b/source3/client/clitar.c
index 16493eca07c13c69acb96ea483f8fcffbb5c8527..534b7218945818833f9c1d72bc5050fb4e52d6bc 100644
(file)
--- a/
source3/client/clitar.c
+++ b/
source3/client/clitar.c
@@
-629,9
+629,9
@@
static void do_atar(const char *rname_in, char *lname,
char *rname = NULL;
TALLOC_CTX *ctx = talloc_stackframe();
char *rname = NULL;
TALLOC_CTX *ctx = talloc_stackframe();
- struct time
val
tp_start;
+ struct time
spec
tp_start;
-
GetTimeOfDay
(&tp_start);
+
clock_gettime_mono
(&tp_start);
data = SMB_MALLOC_ARRAY(char, read_size);
if (!data) {
data = SMB_MALLOC_ARRAY(char, read_size);
if (!data) {
@@
-768,15
+768,15
@@
static void do_atar(const char *rname_in, char *lname,
fnum = -1;
if (shallitime) {
fnum = -1;
if (shallitime) {
- struct time
val
tp_end;
+ struct time
spec
tp_end;
int this_time;
/* if shallitime is true then we didn't skip */
if (tar_reset && !dry_run)
(void) do_setrattr(finfo.name, aARCH, ATTRRESET);
int this_time;
/* if shallitime is true then we didn't skip */
if (tar_reset && !dry_run)
(void) do_setrattr(finfo.name, aARCH, ATTRRESET);
-
GetTimeOfDay
(&tp_end);
- this_time = (tp_end.tv_sec - tp_start.tv_sec)*1000 + (tp_end.tv_
usec - tp_start.tv_usec)/1
000;
+
clock_gettime_mono
(&tp_end);
+ this_time = (tp_end.tv_sec - tp_start.tv_sec)*1000 + (tp_end.tv_
nsec - tp_start.tv_nsec)/1000
000;
get_total_time_ms += this_time;
get_total_size += finfo.size;
get_total_time_ms += this_time;
get_total_size += finfo.size;
@@
-1165,13
+1165,13
@@
static char *get_longfilename(file_info2 finfo)
static void do_tarput(void)
{
file_info2 finfo;
static void do_tarput(void)
{
file_info2 finfo;
- struct time
val
tp_start;
+ struct time
spec
tp_start;
char *longfilename = NULL, linkflag;
int skip = False;
ZERO_STRUCT(finfo);
char *longfilename = NULL, linkflag;
int skip = False;
ZERO_STRUCT(finfo);
-
GetTimeOfDay
(&tp_start);
+
clock_gettime_mono
(&tp_start);
DEBUG(5, ("RJS do_tarput called ...\n"));
buffer_p = tarbuf + tbufsiz; /* init this to force first read */
DEBUG(5, ("RJS do_tarput called ...\n"));
buffer_p = tarbuf + tbufsiz; /* init this to force first read */