Sponsored Content
Operating Systems Linux Ubuntu Measuring the correctness of ndelay() function. Post 302969941 by cjcox on Wednesday 30th of March 2016 11:54:58 AM
Old 03-30-2016
Not necessarily an answer but you could make ndelay very large and time it (possibly outside of the routine).
 

4 More Discussions You Might Find Interesting

1. Programming

Measuring System Call Time

Can anyone please help me in measuring the system call timings! How do I do it if I have to measure the timing of an operation, say getpid system call. What different functions can I use for that and what would be the difference using each of them? Thanx! (3 Replies)
Discussion started by: chacha
3 Replies

2. IP Networking

measuring traffic with iptables

i have a wireless network that is connected to internet over nat.there is ap that is connected to another ap in bridge mode, on ap is used for clients, and the other is connected to the machine that is doing masquerading. so i want to measure traffic of my clients and i thought about doing it with... (0 Replies)
Discussion started by: mdfk
0 Replies

3. Programming

Measuring memory used by a program?

I have a Java program. I want to measure the total memory used by the program, especially the peak memory. Is there a way to do it? I have tried utilities like time (which returns 0) and top (which is not very useful) as the program does not run for long. Can anyone suggest a way to do this?... (5 Replies)
Discussion started by: spathical
5 Replies

4. Red Hat

lightweight function for measuring time ( better than clock_getime )

HI I have a Red Hat Enterprise with Real Time kernel. Are you aware if there are C functions for this kernel or some code/library for this OS for measuring time more lightweight than clock_gettime and gettimeofday? THe hardware I have is NUMA. Reading forums I found gethrtime but it is... (1 Reply)
Discussion started by: manustone
1 Replies
timeout(9r)															       timeout(9r)

NAME
timeout - General: Initializes a callout queue element SYNOPSIS
void timeout( int (*function) (), caddr_t argument, register int time ); ARGUMENTS
Specifies a pointer to the routine to be called. Specifies a single argument to be passed to the called routine. Specifies the amount of time to delay before calling the specified routine. You express time as time (in seconds) * hz. DESCRIPTION
The timeout routine initializes a callout queue element to make it easy to execute the specified routine at the time specified in the time argument. You often use callout routines for infrequent polling or error handling. The routine you specify will be called on the interrupt stack (not in processor context) as dispatched from the softclock routine. The global variable hz contains the number of clock ticks per second. This variable is a second's worth of clock ticks. Thus, if you wanted a 4-minute timeout, you would pass 4 * 60 * hz as the third argument to the timeout routine as follows: /* A 4-minute timeout */ . . . timeout(lptout, (caddr_t)dev, 4 * 60 * hz); NOTES
The granularity of the time delay is dependent on the hardware. For example, the granularity of some Alpha CPUs is 1024 clock ticks per second. Other Alpha CPUs have a granularity of 1200 clock ticks per second. Still other Alpha CPUs exhibit a granularity of 128 clock ticks per second. Because the granularity of the time delay is dependent on the hardware, the operating system provides the hz and lbolt global variables. Use the hz global variable to determine the number of clock ticks per second for a specific Alpha CPU. Use the lbolt global variable as a periodic wakeup mechanism. RETURN VALUES
None SEE ALSO
Routines: untimeout(9r) timeout(9r)
All times are GMT -4. The time now is 05:40 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy