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

  • Home
  • SEARCH
  • 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 401311
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 12, 20262026-05-12T17:01:21+00:00 2026-05-12T17:01:21+00:00

According to this documentation http://www.cplusplus.com/reference/clibrary/ctime/time/ for time(NULL) If the function could not retrieve the

  • 0

According to this documentation http://www.cplusplus.com/reference/clibrary/ctime/time/

for time(NULL) “If the function could not retrieve the calendar time, it returns a -1 value.”

Is this something I should check for in my code? Surely something has got to be going pretty wrong if time(NULL) is not retrieving the time.

  • 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-12T17:01:21+00:00Added an answer on May 12, 2026 at 5:01 pm

    You may be running on an embedded device that doesn’t have a real-time clock.

    The glibc source code claims that the time syscall can’t fail on Linux:

     time_t res = INTERNAL_SYSCALL (time, err, 1, NULL);
      /* There cannot be any error.  */
    

    and indeed this is the case if you look at the kernel source:

    SYSCALL_DEFINE1(time, time_t __user *, tloc)
    {
            time_t i = get_seconds();
    
            if (tloc) {
                    if (put_user(i,tloc))
                            return -EFAULT;
            }
            force_successful_syscall_return();
            return i;
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

According to this: http://www.xmlplease.com/xquery-xhtml XQuery does not have a standard way of setting the
According to CLHS entry for the INTERSECTION function ( http://www.lispworks.com/documentation/HyperSpec/Body/f_isec_.htm ): For every pair
According to the documentation, http://www.computerhope.com/unix/uuniq.htm The command can be used to ignore the first
I want to get an access_token according to this documentation http://dev.twitter.com/doc/post/oauth/request_token . I use
According to this documentation, http://jqueryui.com/demos/datepicker/#option-altFormat I can set a different date format for the
I followed this tutorial: http://www.playframework.org/documentation/2.0/JavaEbean according to the tutorial Finder should return a List<E>
According to the documentation for -[UIView setNeedsLayout] : Because this method does not force
According to D docs ( http://www.digitalmars.com/d/2.0/attribute.html#ProtectionAttribute ) protected module members are illegal, but compiler
So according to Sun's J2EE documentation ( http://docs.sun.com/app/docs/doc/819-3669/bnani?l=en&a=view ), If a tag attribute is
I'm using ICommandText::GetCommandText method. According to the MSDN documentation ( http://msdn.microsoft.com/en-us/library/ms709825(v=VS.85).aspx ) I need

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.