Using Sleep Command

Name Banner Scroll Delay Using Sleep Command

Page 1 of 1

3 Replies - 13572 Views - Last Post: 25 February 2008 - 12:09 PM Rate Topic: -----

#1 WaveJunkee   User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 1
  • Joined: 24-February 08

Using Sleep Command

Post icon  Posted 24 February 2008 - 04:41 PM

I am trying to figure out how to add a delay to this name banner scroll. I've got the scroll part down, but not sure how to proceed with the sleep delay. Any suggestions will be greatly appreciated?

Thanks,
Norm


int main()
{

gotoxy(0, 0);
cout << " " << endl;
usleep(350000);

gotoxy(0, 0);
cout << " N" << endl;
usleep(350000);

gotoxy(0, 0);
cout << " No" << endl;
usleep(350000);

gotoxy(0, 0);
cout << " Nor" << endl;
usleep(350000);

gotoxy(0, 0);
cout << " Norm" << endl;
usleep(350000);

gotoxy(0, 0);
cout << " Norma" << endl;
usleep(350000);

gotoxy(0, 0);
cout << " Norman" << endl;
usleep(350000);

gotoxy(0, 0);
cout << " Normand" << endl;
usleep(120000);

gotoxy(0, 0);
cout << " Normand " << endl;
usleep(350000);

gotoxy(0, 0);
cout << " Normand " << endl;
usleep(350000);

gotoxy(0, 0);
cout << " Normand " << endl;
usleep(350000);

gotoxy(0, 0);
cout << " Normand " << endl;
usleep(350000);

gotoxy(0, 0);
cout << " Normand " << endl;
usleep(350000);

gotoxy(0, 0);
cout << " Normand " << endl;
usleep(350000);

gotoxy(0, 0);
cout << " Normand " << endl;
usleep(350000);

gotoxy(0, 0);
cout << "Normand " << endl;
usleep(350000);

gotoxy(0, 0);
cout << "ormand " << endl;
usleep(350000);

gotoxy(0, 0);
cout << "rmand " << endl;
usleep(350000);

gotoxy(0, 0);
cout << "mand " << endl;
usleep(350000);

gotoxy(0, 0);
cout << "and " << endl;
usleep(350000);

gotoxy(0, 0);
cout << "nd " << endl;
usleep(350000);

gotoxy(0, 0);
cout << "d " << endl;
usleep(350000);

gotoxy(0, 0);
cout << " " << endl;
usleep(350000);

This post has been edited by WaveJunkee: 24 February 2008 - 04:44 PM


Is This A Good Question/Topic? 0
  • +

Replies To: Using Sleep Command

#2 Nykc   User is offline

  • Gentleman of Leisure
  • member icon

Reputation: 737
  • View blog
  • Posts: 8,648
  • Joined: 14-September 07

Re: Using Sleep Command

Posted 24 February 2008 - 10:14 PM

Hello and welcome to Dream In Code. Hope to see you around the forums someday!
Was This Post Helpful? 0
  • +
  • -

#3 WolfCoder   User is offline

  • Isn't a volcano just an angry hill?
  • member icon


Reputation: 822
  • View blog
  • Posts: 7,692
  • Joined: 05-May 05

Re: Using Sleep Command

Posted 25 February 2008 - 09:52 AM

Welcome to Dreamscode ^^
Was This Post Helpful? 0
  • +
  • -

#4 DeeViLiSh   User is offline

  • D.I.C Head
  • member icon

Reputation: 6
  • View blog
  • Posts: 175
  • Joined: 25-July 06

Re: Using Sleep Command

Posted 25 February 2008 - 12:09 PM

void sleep(unsigned seconds);

sleep() suspends execution for an interval (seconds).
With a call to sleep, the current program is suspended from execution for the number of seconds specified by the argument seconds. The interval is accurate only to the nearest hundredth of a second or to the accuracy of the operating system clock, whichever is less accurate.

Sleep(10);

Source : born2c0de (<3)
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1