home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Fresh Fish 8
/
FreshFishVol8-CD1.bin
/
useful
/
dev
/
c
/
cmanual
/
intuition
/
miscellaneous
/
example5.c
< prev
next >
Wrap
C/C++ Source or Header
|
1993-10-12
|
2KB
|
55 lines
/***********************************************************/
/* */
/* Amiga C Encyclopedia (ACE) V3.0 Amiga C Club (ACC) */
/* ------------------------------- ------------------ */
/* */
/* Book: ACM Intuition Amiga C Club */
/* Chapter: Miscellaneous Tulevagen 22 */
/* File: Example5.c 181 41 LIDINGO */
/* Author: Anders Bjerin SWEDEN */
/* Date: 92-05-01 */
/* Version: 1.10 */
/* */
/* Copyright 1992, Anders Bjerin - Amiga C Club (ACC) */
/* */
/* Registered members may use this program freely in their */
/* own commercial/noncommercial programs/articles. */
/* */
/***********************************************************/
/* This example prints out the current time. */
#include <intuition/intuition.h>
struct IntuitionBase *IntuitionBase;
main()
{
ULONG seconds, micros;
/* Open the Intuition Library: */
IntuitionBase = (struct IntuitionBase *)
OpenLibrary( "intuition.library", 0 );
if( IntuitionBase == NULL )
exit(); /* Could NOT open the Intuition Library! */
/* Get the current time: */
CurrentTime( &seconds, µs );
/* Print out the current time: */
printf( "Seconds: %d\n", seconds );
printf( "Micros: %d\n", micros );
/* Close the Intuition Library: */
CloseLibrary( IntuitionBase );
}