Re: 'ticks' in kernel.

2003-03-06 Thread David Malone
On Wed, Mar 05, 2003 at 05:16:20PM -0500, Jan Knepper wrote: > Well, I guess since I have not heard any brilliant solutions. > Could/should I add a query for 'ticks' to sysctl? I can't suggest a better suggestion off the top of my head, unless it would be better as something which you'd get at th

Re: 'ticks' in kernel.

2003-03-05 Thread Jan Knepper
Well, I guess since I have not heard any brilliant solutions. Could/should I add a query for 'ticks' to sysctl? Thanks! Jan Jan Knepper wrote: David Malone wrote: On Tue, Mar 04, 2003 at 02:00:02PM -0500, Jan Knepper wrote: How would they return me the 'value' of 'ticks'? The problem is..

Re: 'ticks' in kernel.

2003-03-04 Thread Jan Knepper
David Malone wrote: On Tue, Mar 04, 2003 at 02:00:02PM -0500, Jan Knepper wrote: How would they return me the 'value' of 'ticks'? The problem is... I have a value's somewhere that has been assigned from 'ticks', like: ptr -> value = ticks; Maybe it would help to explain what you are do

Re: 'ticks' in kernel.

2003-03-04 Thread Jan Knepper
M. Warner Losh wrote: In message: <[EMAIL PROTECTED]> Jan Knepper <[EMAIL PROTECTED]> writes: : How would they return me the 'value' of 'ticks'? : : The problem is... I have a value's somewhere that has been assigned from : 'ticks', like: : ptr -> value = ticks; : : at an other mom

Re: 'ticks' in kernel.

2003-03-04 Thread M. Warner Losh
In message: <[EMAIL PROTECTED]> Jan Knepper <[EMAIL PROTECTED]> writes: : How would they return me the 'value' of 'ticks'? : : The problem is... I have a value's somewhere that has been assigned from : 'ticks', like: : ptr -> value = ticks; : : at an other moment I need to do somet

Re: 'ticks' in kernel.

2003-03-04 Thread David Malone
On Tue, Mar 04, 2003 at 02:00:02PM -0500, Jan Knepper wrote: > How would they return me the 'value' of 'ticks'? > > The problem is... I have a value's somewhere that has been assigned from > 'ticks', like: > ptr -> value = ticks; Maybe it would help to explain what you are doing at a higher le

Re: 'ticks' in kernel.

2003-03-04 Thread Jan Knepper
How would they return me the 'value' of 'ticks'? The problem is... I have a value's somewhere that has been assigned from 'ticks', like: ptr -> value = ticks; at an other moment I need to do something like... age = boottime + ( ticks - ptr -> value ) / factor; The problem in the second cas

Re: 'ticks' in kernel.

2003-03-04 Thread M. Warner Losh
In message: <[EMAIL PROTECTED]> Jan Knepper <[EMAIL PROTECTED]> writes: : No, I have looked that those, they do not work for me as I need to be : able to compate the value if 'ticks' with a value initialized from 'ticks'. : The problems is that 'ticks' is not 'exact'. So I cannot calcu

Re: 'ticks' in kernel.

2003-03-04 Thread Jan Knepper
No, I have looked that those, they do not work for me as I need to be able to compate the value if 'ticks' with a value initialized from 'ticks'. The problems is that 'ticks' is not 'exact'. So I cannot calculate it with the different between the boot time and the current time * a constant facto

Re: 'ticks' in kernel.

2003-03-04 Thread M. Warner Losh
In message: <[EMAIL PROTECTED]> Jan Knepper <[EMAIL PROTECTED]> writes: : Any one have an idea how to pull the value for 'ticks' (kern_clock.c) : from the kernel? : I have looked into sysctl, but could not find "how to". : I am overlooking something? Why? You'll likely want to look a

Re: 'ticks' in kernel.

2003-03-03 Thread Kan Cai
Probably you could try this: " asm volatile(".byte 0x0f, 0x31" : "=A" (tstart)); asm volatile(".byte 0x0f, 0x31" : "=A" (tend)); " it should be right for X86 platform. --Ken On Mon, 3 Mar 2003, Jan Knepper wrote: > Any one have an idea how to pull the value for 'ticks' (kern_clock.c) > from