Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6092699
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T12:28:27+00:00 2026-05-23T12:28:27+00:00

i need to exchange a struct timeval between kernl-space and user-space (through a netlink

  • 0

i need to exchange a struct timeval between kernl-space and user-space (through a netlink message) in order to calculate the elapsed time between the creation of the message and the elaboration in userspace.
i’m using the function jiffies_to_timeval in kernel-space; in user-space i call gettimeofday…but if i print the number of seconds of both structures i obtain a difference of 200 seconds…i can’t figure out the reason for this.

Any ideas?

Thank you all!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-23T12:28:28+00:00Added an answer on May 23, 2026 at 12:28 pm

    There are several clocks inside of Linux. The differences boil down to whether they tick while the machine is suspended, whether they try to track “wall clock time”, and how high-resolution they are.

    do_gettimeofday is probably not what you want to use, since that clock tries to track “wall clock time”; that is, it can actually jump forwards or backwards. What if someone — or something (like NTP) — decided to set the system clock between the two times you read it?

    For timing, I would recommend using the POSIX clock_gettime function with the CLOCK_MONOTONIC clock ID. (You might have to compile your user-space application with -lrt, though.)

    I believe clock_gettime also exists as a kernel function, although I do not have my kernel sources handy at the moment…

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

i have two machines running MATLAB and i need to exchange information(numbers,images) between them,is
I need to exchange data between FreeImage (FIBITMAP) and OpenCV format (IplImage and/or Mat).
I need to retrieve a users' calendar entries for a time period using Exchange
I need a way to exchange data between a process and a windows service.
I need to write a script for MS Exchange Server 2003 that will analyze
I have an exchange rate table. I need to get current rate and previous
Need to locate the following pattern: The letter I followed by a space then
I have Exchange 2010 and I need to run a process using web services
Since Exchange doesn't provide support for all local calendar types in OWA, I need
I need to get the index of a exchange like NASDAQ rather than the

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.