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 8338353
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T04:33:59+00:00 2026-06-09T04:33:59+00:00

When I do $(time sleep 1) , I got: real 0m1.001s user 0m0.000s sys

  • 0

When I do $(time sleep 1), I got:

real    0m1.001s
user    0m0.000s
sys     0m0.000s

I’m not sure why sys time was 0, so nanosleep is called from userspace ?

Also, does the real time equals to context switch time + real sleep time (1s) ?

  • 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-06-09T04:34:00+00:00Added an answer on June 9, 2026 at 4:34 am

    Looking at the man page for time, we can see that,

    1. real : Length of time the program took to terminate, calculated as :

      (time at end of program - time at star of program)

    2. user : The sum of the tms_utime and tms_cutime values in a struct tms as returned by times(2)

    3. sys : The sum of the tms_stime and tms_cstime values in a struct tms as returned by times(2)

    So the result you are getting effectively means that your program lasted for 1 second and in that 1 second it used 0 seconds as user time and 0 seconds as system time. Which is exactly what we should expect from the program.

    When a program is sleeping it just means the kernel will not schedule it for processing, it won’t even run no-ops, it just wont run so no system time is consumed.

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

Sidebar

Related Questions

I want to repeatedly check a variable every time php wakes up from sleep().
I'd like to append a character to a text area in real-time. I've got
Assume I have the following ; def test(): while 1: a = b time.sleep(60)
use strict; use warnings; use Time::HiRes qw(sleep); use Test::WWW::Selenium; use Test::More no_plan; use Test::Exception;
Is it possible to sleep for an amount of time that will be accurate
Can we use sleep function at applicationDidFinishLaunching to take more time to show Splash
I found an example of QueryPerformanceCounter, http://advancedcppwithexamples.blogspot.com/2009/08/measuring-elapsed-time-in-c-using_21.html The example measures a sleep of 100ms
Time is confusing... How can one calculate the time elapsed from PM to AM
Time for another silly question :) I got some tables in a xhtml-document with
I've got a view like the following: from django.views.decorators.http import condition def stream(): for

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.