search for: tv_usec

Displaying 20 results from an estimated 636 matches for "tv_usec".

Did you mean: tv_sec
2003 Mar 17
3
nanosleep() replacement
...) +{ + 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) + + return(rc); +} + +#endif +...
2001 Nov 29
1
patch from faith@alephnull to add rate indicator to --progress
...)*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 ? ((ofs-start_ofs) / diff) * 1000.0/1024.0 : 0; + +...
2002 Mar 06
1
smbd/oplock.c:request_oplock_break(997)
...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 break request to pi...
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], \ + (long) z.tv_sec,...
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
2003 Jun 18
1
Oops more testing was required....
...ep when the rouding + * becomes insignificant. (less than 10%) -- REW. **/ static void sleep_for_bwlimit(int bytes_written) { struct timeval tv; + static int time_to_sleep = 0; if (!bwlimit) return; @@ -427,9 +436,13 @@ assert(bytes_written > 0); assert(bwlimit > 0); - tv.tv_usec = bytes_written * 1000 / bwlimit; - tv.tv_sec = tv.tv_usec / 1000000; - tv.tv_usec = tv.tv_usec % 1000000; + time_to_sleep += bytes_written * 1000 / bwlimit; + + if (time_to_sleep < 100000) return; + + tv.tv_sec = time_to_sleep / 1000000; + tv.tv_usec = time_to_sleep % 1000000; + time_to_slee...
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
2006 Apr 01
1
Sys.sleep() burns up CPU on Solaris 8
I noticed that R was burning up 100% of a CPU when a call to Sys.sleep() was made. Upon investigation, I discovered that R_checkActivityEx() in src/unix/sys-std.c was putting the entire timeout (in usec) into the struct timeval tv_usec member, leaving tv_sec set to 0. I don't know about other unix variants, but Solaris requires that the timeout value be normalized (i.e. 0 <= tv_usec < 1000000). Because a value greater than 1000000 was being placed in tv_usec, select() was returning an error (EINVAL) immediately, cau...
2000 Aug 01
2
ogg123 timekeeping
...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 --- >8 ---- List archives: http://www.xiph.org/archives/ Ogg project homepage: http://www.xiph.org/ogg/
2011 Oct 06
2
[LLVMdev] A potential bug
...telementptr 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 14. %tv_usec = getelementptr inbounds %struct.timeval* %agg.tmp, i32 0, i32 1 15. %tv_usec.safe_r = call i32* @llvm.guard.load.p0i32(i32* %tv_usec) // intrinsic function call ... 16. %tmp16 = load i32* %tv_usec.safe_r, align 4, !tbaa !4 17. %tv_sec17 = getelementptr inbounds %struct.timeval* %agg.tmp12, i32...
2018 Feb 13
1
dovecot: master: Panic: kevent() failed: Invalid argument
...the kevent() call are obtained by calling io_loop_get_wait_time(), which in turn calls timeout_get_wait_time() (both in ioloop.c). The timeout is computed by subtracting the value returned by gettimeofday() from timeout->next_run, and it looks like in very rare cases the result in tv_r->tv_usec is 1000000uS (1 second). So, it seems that if gettimeofday() returns exactly 0 microseconds, and timeout->next_run has exactly 1000000 microseconds, the kevent() call will fail (1 in 1e12 chance?). I'm not entirely sure where timeout->next_run is computed, but looking at timeout_upda...
2011 Oct 06
2
[LLVMdev] A potential bug
...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 >> 14.  %tv_usec = getelementptr inbounds %struct.timeval* %agg.tmp, i32 0, i32 >> 1 >> 15.  %tv_usec.safe_r = call i32* @llvm.guard.load.p0i32(i32* %tv_usec)  // >> intrinsic function call ... >> 16.  %tmp16 = load i32* %tv_usec.safe_r, align 4, !tbaa !4 >> 17.  %tv_sec17 = getelement...
2003 Jan 13
1
request_oplock_break: no response received to oplock break request
...way, 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, 0] smbd/oplock.c:(12...
2005 Dec 28
5
Regular crashes
...e. #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 = 1135275568, tv_usec = 9...
2011 Oct 06
0
[LLVMdev] A potential bug
...imeval* %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 > 14.  %tv_usec = getelementptr inbounds %struct.timeval* %agg.tmp, i32 0, i32 > 1 > 15.  %tv_usec.safe_r = call i32* @llvm.guard.load.p0i32(i32* %tv_usec)  // > intrinsic function call ... > 16.  %tmp16 = load i32* %tv_usec.safe_r, align 4, !tbaa !4 > 17.  %tv_sec17 = getelementptr inbounds %struct...
2007 Dec 05
2
New feature: calling all bug marshals
...time". I've used "local" in my example above. > And > I read out the time first as GMT/UT (because I travel a lot), and then in > the > timezone of my PBX... > > -Philip > Philip, I just was looking over the app_waitutil.c and am confused you add 500 to tv.tv_usec on the line "msec = (future - tv.tv_sec) * 1000 - ((tv.tv_usec + 500) / 1000);"? Ryan
2020 Oct 17
0
[PATCH nbdkit] common/include/tvdiff.h: Add formal specification.
...l.h> +#include <stdint.h> #include <sys/time.h> -/* Return the number of µs (microseconds) in y - x. */ -static inline int64_t -tvdiff_usec (const struct timeval *x, const struct timeval *y) +/*@ + predicate valid_timeval (struct timeval tv) = + tv.tv_sec >= 0 && tv.tv_usec >= 0 && tv.tv_usec < 1000000; + logic integer tv_to_microseconds (struct timeval tv) = + tv.tv_sec * 1000000 + tv.tv_usec; + */ + +#ifdef FRAMA_C + +/*@ + assigns *r; + behavior success: + assumes INT64_MIN <= a + b <= INT64_MAX; + ensures *r == a + b; + ensu...
2011 Oct 06
0
[LLVMdev] A potential bug
...; 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 > >> 14. %tv_usec = getelementptr inbounds %struct.timeval* %agg.tmp, i32 0, > i32 > >> 1 > >> 15. %tv_usec.safe_r = call i32* @llvm.guard.load.p0i32(i32* %tv_usec) > // > >> intrinsic function call ... > >> 16. %tmp16 = load i32* %tv_usec.safe_r, align 4, !tbaa !4 > &g...
2011 Oct 06
1
[LLVMdev] A potential bug
...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 >> >> 14.  %tv_usec = getelementptr inbounds %struct.timeval* %agg.tmp, i32 >> >> 0, i32 >> >> 1 >> >> 15.  %tv_usec.safe_r = call i32* @llvm.guard.load.p0i32(i32* %tv_usec) >> >> // >> >> intrinsic function call ... >> >> 16.  %tmp16 = load i32*...
2001 Mar 07
3
Explorer & MS Office hang
...full of information about oplocks like this: [2001/03/07 10:14:04, 0] smbd/oplock.c:request_oplock_break(1204) request_oplock_break: no response received to oplock break request to pid 2252 on port 33706 for dev = 3180020, inode = 6302796 for dev = 3180020, inode = 6302796, tv_sec = 3aa6328b, tv_usec = 6168f [2001/03/07 10:14:08, 0] smbd/oplock.c:request_oplock_break(1204) request_oplock_break: no response received to oplock break request to pid 2252 on port 33706 for dev = 3180020, inode = 6302796 for dev = 3180020, inode = 6302796, tv_sec = 3aa6328b, tv_usec = 6168f [2001/03/07 10:14:27,...