TIME2SEC() and time2secc()

Fortran version:

    INTEGER FUNCTION  TIME2SEC( DTIME )
        INTEGER   DTIME    	!  time interval H*MMSS

C version:

    int time2secc( int  dtime ) ;

Summary:

Returns the number of seconds in the time interval DTIME. DTIME may be positive or negative (in which latter case, its hour, minutes, and seconds fields are assumed to be all negative or zero).

See also SEC2TIME() and SECSDIFF()

Preconditions:

#include "iodecl3.h" for C.

DTIME represented H*MMSS = 100 * ( 100 * HOURS + MINS ) + SECS
Either HOURS, MINS, SECS >= 0, or HOURS, MINS, SECS <= 0.

Fortran Usage:

    ...
    INTEGER   TIME2SEC
    INTEGER   SECS
    ...
    SECS = TIME2SEC( 12345 )
C	    Now SECS is the number of seconds in the time interval
C           1 hour, 23 minutes and 45 seconds
    ...

C Usage:

    ...
    #include "iodecl3.h"                          
    ...
    int  secs ;
    ...
    secs = time2secc( 123456 ) ;
            /*  Now secs is the number of seconds in the time
                interval  12 hours 34 minutes and 56 seconds  */
    ...


Previous: SECSDIFF

Next: WKDAY

Up: Date-Time Manipulation Routines

To: Models-3/EDSS I/O API: The Help Pages