Main Menu

HOME

.Net
ASP
Assembly
C
C++
Delphi
HTML
Java
JavaScript
MySQL
PC interface
Powershell
Perl
PHP
VBScript
Visual Basic
XML

Make money selling software. Check this out here

Hosted clickbank mall. Check this out here




   Misc

   Amazon

   Links

    


Difftime example
 

 

This shows the difftime function and in this case we will pause our program for 5 seconds with it.

Code


#include <stdio.h>
#include <time.h>

int main()
{
time_t start;
time_t current;

time(&start);
printf("delay for 5 seconds.\n");
do{
time(&current);
}while(difftime(current,start) < 5.0);
printf("Finished delay.\n");


return 0;
}

Information

tested using LCC Win 32

 

 

 

 

 

 




   Sponsors
 

   Software
500 Java Tips E-book
PHP editor
PERL editor
Beginning Java
Beginning Visual Basic
Learn VB.net
Learn VB 6
VB and databases
ASP image library
C++ builder programming
C++ fundamentals

   Source Code
Convert to Hex / Octal value(ASP)
load a bitmap(Blitzbasic)
Datediff example(ASP)
split a file into path info(php)
basic web control example(VB)
A text effect(VB)
Display the current time(PHP)
Email function(ASP)

    




Copyright © 2003 by programmershelp.co.uk