All pastes #550146 Raw Edit

Someone

public text v1 · immutable
·published 2007-06-08 10:22 UTC
rendered paste body
#include <time.h>

/* Returns current time in Unixtime format */
void utime_(int *i)
{
    time_t t;
    time(&t);
    
    *i = (int)t;
}

---------------------

PROGRAM UTBOX
    IMPLICIT NONE
    
    ! CHECKS CURRENT TIME AND STORES THE RESULT
    ! IN THE "VARIABLE" (INTEGER) IN UNIXTIME FORMAT
    !
    ! CALL UTIME( VARIABLE ) 
    EXTERNAL :: UTIME
    INTEGER :: UUTIME
    CALL UTIME(UUTIME)

    WRITE(*,*) UUTIME
END PROGRAM UTBOX