Howdy, Stranger!

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

Categories

Time functions on C and C++

nazarethnazareth Member Posts: 22
I want to know the functions that use to handle time. Its parameters and return type...
Thanks....
[b][italic][yellow]naz[/yellow][blue]ar[/blue][red]eth[/red][/italic][/b]

Comments

  • slicer69slicer69 Member Posts: 272
    C/C++ usually uses the time() and localtime() functions
    to manipulate time. Calling time() returns a pointer to time_t (if I remeber correctly) which you can then pass to localtime(). This function then converts the raw time value into a "struct tm". This contians fields with the hour, minute and second values at the time when time() was called.

    For more information, look at the time.h header.

  • Chris BrownChris Brown USAMember Posts: 4,496 ✭✭

    ______ \ http://forcoder.org \ free video tutorials and ebooks about // Scratch, Perl, Java, Ruby, Assembly, R, Go, C++, MATLAB, Delphi, C, JavaScript, Python, PHP, Visual Basic .NET, PL/SQL, Swift, Visual Basic, C#, Objective-C Ada, Scala, COBOL, Logo, Alice, Hack, Kotlin, Bash, ML, ABAP, Prolog, Transact-SQL, Apex, Erlang, D, Dart, Lua, VBScript, Scheme, FoxPro, Rust, Fortran, SAS, Awk, Julia, Lisp, F#, Clojure, Crystal, LabVIEW // _____________

Sign In or Register to comment.