Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

Welcome to the new platform of Programmer's Heaven! We apologize for the inconvenience caused, if you visited us from a broken link of the previous version. The main reason to move to a new platform is to provide more effective and collaborative experience to you all. Please feel free to experience the new platform and use its exciting features. Contact us for any issue that you need to get clarified. We are more than happy to help you.

C code To get the current system time

lsinghlsingh Posts: 2Member
Hi All,

Can somebody please provide me with the free sample code to get the current system timings? Our product has a copy right, that needs to be updated each time with the current year (Hard coded). I need to modify this such that it automatically updates the copy right to current year.

Awaiting for quick responses.

Thank you.

Comments

  • LundinLundin Posts: 3,711Member
    We have a policy against posters asking for code without any effort made by themselves. You could however ask for help about how to solve a specific problem, though you will have to write the code yourself.

    Further, you need to specify which system and compiler you are using, or nobody will be able to help you. There are thousands of different embedded systems and hundreds of compilers.
  • lsinghlsingh Posts: 2Member
    : We have a policy against posters asking for code without any effort
    : made by themselves. You could however ask for help about how to
    : solve a specific problem, though you will have to write the code
    : yourself.
    :
    : Further, you need to specify which system and compiler you are
    : using, or nobody will be able to help you. There are thousands of
    : different embedded systems and hundreds of compilers.

    Hi, I am using a DOS machine. There is no compiler as such, but I am using an editor called codeWright & codeView debugger. Thanks!!
  • LundinLundin Posts: 3,711Member
    I take it that you mean you will only be using ANSI C? Since you must have a compiler to make C programs. Check out the functions clock(), time() and gmtime().
  • stars_625stars_625 Posts: 6Member
    : Hi All,
    :
    : Can somebody please provide me with the free sample code to get
    : the current system timings? Our product has a copy right, that needs
    : to be updated each time with the current year (Hard coded). I need
    : to modify this such that it automatically updates the copy right to
    : current year.
    :
    : Awaiting for quick responses.
    :
    : Thank you.
    :

    word on DOS, you can use the DOS System Function Lib, Include "system.h" and so on!
Sign In or Register to comment.