search for: tv_sec

Displaying 20 results from an estimated 898 matches for "tv_sec".

2003 Mar 17
3
nanosleep() replacement
...espec *req, struct timespec *rem) +{ + int rc; + extern int errno; + struct timeval tsave, ttmp, time2wait; + + TIMESPEC_TO_TIMEVAL(&time2wait, req) + + gettimeofday(&tsave, NULL); + rc = select(0, NULL, NULL, NULL, &time2wait); + if (rc) { + gettimeofday (&ttmp, NULL); + ttmp.tv_sec -= tsave.tv_sec; + ttmp.tv_usec -= tsave.tv_usec; + tsave.tv_sec = (time2wait.tv_sec - ttmp.tv_sec); + tsave.tv_usec = (time2wait.tv_usec - ttmp.tv_usec); + if(tsave.tv_sec < 0){ + tsave.tv_sec = 0; + tsave.tv_usec += 1000000L; + } + rc = -1; + } + + TIMEVAL_TO_TIMESPEC(&tsave, rem...
2004 Feb 27
2
patch: better progress meter
Skipped content of type multipart/mixed-------------- next part -------------- A non-text attachment was scrubbed... Name: PGP.sig Type: application/pgp-signature Size: 186 bytes Desc: This is a digitally signed message part Url : http://lists.samba.org/archive/rsync/attachments/20040227/923b87ee/PGP.bin
2001 Nov 29
1
patch from faith@alephnull to add rate indicator to --progress
...001 @@ -835,28 +835,70 @@ return (int)*s1 - (int)*s2; } -static OFF_T last_ofs; +static OFF_T last_ofs; +static struct timeval print_time; +static struct timeval start_time; +static OFF_T start_ofs; + +static unsigned long msdiff(struct timeval *t1, struct timeval *t2) +{ + return (t2->tv_sec - t1->tv_sec) * 1000 + + (t2->tv_usec - t1->tv_usec) / 1000; +} + +static void rprint_progress(OFF_T ofs, OFF_T size, struct timeval *now) +{ + int pct = (int)((100.0*ofs)/size); + unsigned long diff = msdiff(&start_time, now); + double rate = diff ? (...
2000 Aug 01
2
ogg123 timekeeping
...c> info.u_time = ov_time_total (&vf, -1); /* Seconds with double precision */ gettimeofday (&start_time, NULL); t_min = (long) info.u_time / (long) 60; t_sec = info.u_time - 60 * t_min; while (! eos) { gettimeofday (&cur_time, NULL); c_min = (long) (cur_time.tv_sec - start_time.tv_sec) / (long) 60; c_sec = (cur_time.tv_sec - start_time.tv_sec) - 60 * c_min + ((cur_time.tv_usec - start_time.tv_usec) / 1000000.0); </snip> Scream now! I'm committing... I know time functions like this have easy equivalents on other OSes. Kenneth --- &g...
2002 Mar 06
1
smbd/oplock.c:request_oplock_break(997)
...in_client_validate: could not fetch trust account password for domain NENN [2002/02/25 09:02:47, 0] smbd/oplock.c:request_oplock_break(997) request_oplock_break: no response received to oplock break request to pid 626 on port 34350 for dev = 308, inode = 1163298 for dev = 308, inode = 1163298, tv_sec = 3c79ef1b, tv_usec = 746a1 [2002/02/25 09:03:00, 0] smbd/password.c:domain_client_validate(1563) domain_client_validate: could not fetch trust account password for domain NENN [2002/02/25 09:03:19, 0] smbd/oplock.c:request_oplock_break(997) request_oplock_break: no response received to oplock...
2019 Sep 28
0
[PATCH nbdkit v2 1/4] common/include: Add function for subtracting struct timeval.
...\ + struct timeval z; \ + \ + subtract_timeval (&tv1, &tv2, &z); \ + if (z.tv_sec != (exp_sec) || z.tv_usec != (exp_usec)) { \ + fprintf (stderr, \ + "%s: unexpected (%ld, %d), expecting (%ld, %d)\n", \ + argv[0], \ +...
2004 Jul 14
12
HP-UX 11i and largefiles on rsync 2.6.2
Hello, I'm running HP-UX 11i on an rp74xx. It's 64-bit. C compiler is as follows: B3901BA B.11.11.03 HP C/ANSI C Developer's Bundle for HP-UX 11.i (S800) B3913DB C.03.30.02 HP aC++ Compiler (S800) /usr/bin/cc: LINT B.11.11.02 CXREF B.11.11.02 HP92453-01 B.11.11.02 HP C Compiler $ Sep 8 2000 23:13:51 $ I have successfully compiled rsync 2.6.2 and it
2019 Jan 25
0
[klibc:update-dash] builtin: Greater resolution in test -nt / test -ot
...t.c index 58c05fec..d1458df3 100644 --- a/usr/dash/bltin/test.c +++ b/usr/dash/bltin/test.c @@ -476,9 +476,17 @@ newerf (const char *f1, const char *f2) { struct stat b1, b2; +#ifdef HAVE_ST_MTIM + return (stat (f1, &b1) == 0 && + stat (f2, &b2) == 0 && + ( b1.st_mtim.tv_sec > b2.st_mtim.tv_sec || + (b1.st_mtim.tv_sec == b2.st_mtim.tv_sec && (b1.st_mtim.tv_nsec > b2.st_mtim.tv_nsec ))) + ); +#else return (stat (f1, &b1) == 0 && stat (f2, &b2) == 0 && b1.st_mtime > b2.st_mtime); +#endif } static int @@ -486,9 +494,1...
2020 Mar 28
0
[klibc:update-dash] dash: builtin: Greater resolution in test -nt / test -ot
...t.c index 58c05fec..d1458df3 100644 --- a/usr/dash/bltin/test.c +++ b/usr/dash/bltin/test.c @@ -476,9 +476,17 @@ newerf (const char *f1, const char *f2) { struct stat b1, b2; +#ifdef HAVE_ST_MTIM + return (stat (f1, &b1) == 0 && + stat (f2, &b2) == 0 && + ( b1.st_mtim.tv_sec > b2.st_mtim.tv_sec || + (b1.st_mtim.tv_sec == b2.st_mtim.tv_sec && (b1.st_mtim.tv_nsec > b2.st_mtim.tv_nsec ))) + ); +#else return (stat (f1, &b1) == 0 && stat (f2, &b2) == 0 && b1.st_mtime > b2.st_mtime); +#endif } static int @@ -486,9 +494,1...
2011 Oct 06
2
[LLVMdev] A potential bug
...t.timeval* %end to i64* // eliminated ... 8. %3 = bitcast %struct.timeval* %agg.tmp12 to i64* // eliminated ... 9. %tmp50 = load i64* %2, align 8 // eliminated ... 10. store i64 %tmp50, i64* %3, align 8 // eliminated ... 11. %tv_sec = getelementptr inbounds %struct.timeval* %agg.tmp, i32 0, i32 0 12. %tv_sec.safe_r = call i32* @llvm.guard.load.p0i32(i32* %tv_sec) // intrinsic function call inserted by me 13. %tmp15 = load i32* %tv_sec.safe_r, align 4, !tbaa !4 // this loads the value stored at line 6 1...
2005 May 16
2
Assertion Failure in mbox-sync.c
...re file's still here if any other info will help: (gdb) p sync_ctx->input->real_stream->statbuf $5 = {st_dev = 0, __pad1 = 0, __st_ino = 0, st_mode = 0, st_nlink = 0, st_uid = 0, st_gid = 0, st_rdev = 0, __pad2 = 0, st_size = 4294967295, st_blksize = 0, st_blocks = 0, st_atim = {tv_sec = 1116279667, tv_nsec = 0}, st_mtim = {tv_sec = 1116279667, tv_nsec = 0}, st_ctim = { tv_sec = 1116279667, tv_nsec = 0}, st_ino = 0} (gdb) p sync_ctx->file_input->v_offset $8 = 142294527 The mbox size is larger than 142294527 I did notice this, but I'm not sure if I'm lookin...
2016 Mar 09
4
mkdir-dup test flapping
...643 smb_fname_str_dbg(smb_dname))); 3644 fd_close(fsp); (gdb) p smb_dname->st $1 = {st_ex_dev = 64512, st_ex_ino = 44701075, st_ex_mode = 16877, st_ex_nlink = 2, st_ex_uid = 50133, st_ex_gid = 50133, st_ex_rdev = 0, st_ex_size = 0, st_ex_atime = {tv_sec = 1457488009, tv_nsec = 820161188}, st_ex_mtime = {tv_sec = 1457488009, tv_nsec = 820161188}, st_ex_ctime = { tv_sec = 1457488009, tv_nsec = 820161188}, st_ex_btime = { tv_sec = 1457488009, tv_nsec = 820161188}, st_ex_calculated_birthtime = true, st_ex_blksize = 4096, st_ex_blocks = 8,...
2002 Feb 06
2
SFTP Status Bar..
...buf) - strlen(buf), " %5llu %c%c ", + (unsigned long long) abbrevsize, prefixes[i], + prefixes[i] == ' ' ? ' ' : 'B'); + + timersub(&now, &lastupdate, &wait); + if (cursize > lastsize) { + lastupdate = now; + lastsize = cursize; + if (wait.tv_sec >= STALLTIME) { + start->tv_sec += wait.tv_sec; + start->tv_usec += wait.tv_usec; + } + wait.tv_sec = 0; + } + timersub(&now, start, &td); + elapsed = td.tv_sec + (td.tv_usec / 1000000.0); + + if ((totalbytes != statbytes) && + (statbytes <= 0 || elapsed <=...
2011 Oct 06
2
[LLVMdev] A potential bug
...>> 8.  %3 = bitcast %struct.timeval* %agg.tmp12 to i64*   // eliminated ... >> 9.  %tmp50 = load i64* %2, align 8                               // >> eliminated ... >> 10.  store i64 %tmp50, i64* %3, align 8                           // >> eliminated ... >> 11.  %tv_sec = getelementptr inbounds %struct.timeval* %agg.tmp, i32 0, i32 >> 0 >> 12.  %tv_sec.safe_r = call i32* @llvm.guard.load.p0i32(i32* %tv_sec)   // >> intrinsic  function call inserted by me >> 13.  %tmp15 = load i32* %tv_sec.safe_r, align 4, !tbaa >> !4                  ...
2003 Jan 13
1
request_oplock_break: no response received to oplock break request
...sort of stuff. Anyway, the other day some users started having troubles with saving ms-word files. The smbd processes have always been running as root. But now the users with the problem own their smbd process. And they get errors like such in the log file: for dev = 8100000, inode = 17169, tv_sec = 3e22d418, tv_usec = 931fe [2003/01/13 12:46:27, 0] smbd/oplock.c:(1204) request_oplock_break: no response received to oplock break request to pid 5755 on port 1450 for dev = 8100000, inode = 144022 for dev = 8100000, inode = 144022, tv_sec = 3e22dc57, tv_usec = d9670 [2003/01/13 12:46:30,...
2005 Dec 28
5
Regular crashes
...le info available. #1 0x0806c146 in ast_mutex_trylock (pmutex=0x672e33fc) at lock.h:597 No locals. #2 0x0806175a in ast_queue_hangup (chan=0x672e3330) at channel.c:671 f = {frametype = 4, subclass = 1, datalen = 0, samples = 0, mallocd = 0, offset = 0, src = 0x0, data = 0x0, delivery = {tv_sec = 0, tv_usec = 0}, prev = 0x0, next = 0x0} #3 0x408fc2d9 in __sip_autodestruct (data=0x81be208) at chan_sip.c:1315 p = (struct sip_pvt *) 0x81be208 #4 0x08056c3e in ast_sched_runq (con=0x8172f28) at sched.c:373 current = (struct sched *) 0x8174868 tv = {tv_sec = 113527...
2011 Oct 06
0
[LLVMdev] A potential bug
...      // eliminated ... > 8.  %3 = bitcast %struct.timeval* %agg.tmp12 to i64*   // eliminated ... > 9.  %tmp50 = load i64* %2, align 8                               // > eliminated ... > 10.  store i64 %tmp50, i64* %3, align 8                           // > eliminated ... > 11.  %tv_sec = getelementptr inbounds %struct.timeval* %agg.tmp, i32 0, i32 > 0 > 12.  %tv_sec.safe_r = call i32* @llvm.guard.load.p0i32(i32* %tv_sec)   // > intrinsic  function call inserted by me > 13.  %tmp15 = load i32* %tv_sec.safe_r, align 4, !tbaa > !4                     // this loads the...
2008 Feb 20
1
(message_parser_parse_next_block): assertion, failed: (ctx->input->eof)
...= (struct maildir_save_context *) 0x62f048 storage = (struct mail_storage *) 0x60a848 buf = {actime = 140737488347376, modtime = 4931367} st = {st_dev = 83951370, st_ino = 6401796, st_mode = 33152, st_nlink = 1, st_uid = 24311, st_gid = 3004, st_rdev = 0, st_atimespec = {tv_sec = 1203480135, tv_nsec = 388223000}, st_mtimespec = {tv_sec = 1203480167, tv_nsec = 749911000}, st_ctimespec = {tv_sec = 1203480167, tv_nsec = 749911000}, st_size = 28267, st_blocks = 56, st_blksize = 4096, st_flags = 0, st_gen = 0, st_lspare = 0, st_birthtimespec = {tv_sec = 0, tv_nsec = 0...
2008 Sep 09
1
1.1.3: imap crashes with SIGSEGV
...879f120 "/home/n/i/nivanov/Maildir/.Drafts" st = {st_dev = 13257686650873676099, __pad1 = 65024, __st_ino = 0, st_mode = 0, st_nlink = 6076788, st_uid = 16832, st_gid = 2, st_rdev = 429496771878, __pad2 = 0, st_size = 0, st_blksize = 12288, st_blocks = 17592186044416, st_atim = {tv_sec = 24, tv_nsec = 0}, st_mtim = { tv_sec = 1219648514, tv_nsec = 0}, st_ctim = {tv_sec = 1219648514, tv_nsec = 0}, st_ino = 1220756980} pool = <value optimized out> #9 0x08070d24 in maildir_mailbox_open (_storage=0x87aacc0, name=0x87af6ee "Drafts", input=0x0, flags=0)...
2002 Jan 30
1
Quick sftp status indicator.
...buf) - strlen(buf), " %5llu %c%c ", + (unsigned long long) abbrevsize, prefixes[i], + prefixes[i] == ' ' ? ' ' : 'B'); + + timersub(&now, &lastupdate, &wait); + if (cursize > lastsize) { + lastupdate = now; + lastsize = cursize; + if (wait.tv_sec >= STALLTIME) { + start.tv_sec += wait.tv_sec; + start.tv_usec += wait.tv_usec; + } + wait.tv_sec = 0; + } + timersub(&now, &start, &td); + elapsed = td.tv_sec + (td.tv_usec / 1000000.0); + + if (flag != 1 && + (statbytes <= 0 || elapsed <= 0.0 || cursize >...