ktime_get() equivalent from user space

manty kuma mantykuma at gmail.com
Mon Dec 1 20:31:07 EST 2014


Hi all,

using clock_gettime
<http://man7.org/linux/man-pages/man2/clock_gettime.2.html>(CLOCK_MONOTONIC),
the problem is solved.

Best Regards,
Manty

On Mon, Dec 1, 2014 at 5:47 PM, manty kuma <mantykuma at gmail.com> wrote:

> Hi Vignesh,
>
> Thank you for your answer. I have chosen ktime_get() as it is in sync with
> the times logged in kernel log.
> Hence, doing it with ktime_get() will be my first choice.
>
> Regards,
> Manty
>
> On Mon, Dec 1, 2014 at 5:35 PM, Vignesh Radhakrishnan <
> vignesh1192 at gmail.com> wrote:
>
>> An alternative that you can consider would be to expose the desired time
>> or value from your driver, using a sysfs entry so that they can be synced
>> to what you are doing in the driver level and  user space can read it using
>> 'cat'
>>
>> Thanks and regards,
>> Vignesh Radhakrishnan
>>
>> On Monday, December 1, 2014, manty kuma <mantykuma at gmail.com> wrote:
>> > Hi,
>> >
>> > I need to measure some timings in my system. At driver level, i am
>> using ktime_get() to log the times.
>> > I need to map this to something of the same unit at user space.
>> >
>> > I checked /proc/uptime. This value also includes the suspend time which
>> ktime_get() doesn't include. Hence this option is ruled out.
>> >
>> > Is there any other proc entry or any other source which is of same unit?
>> >
>> > Best Regards,
>> > manty
>> >
>>
>> --
>> http://vigneshradhakrishnan.blogspot.com/
>>
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20141202/c1cb825a/attachment.html 


More information about the Kernelnewbies mailing list