Menu
Menu
DaniWeb
Log In
Sign Up
Read
Contribute
Meet
Search
Search
About 204 results for
usleep
- Page 1
Does usleep consume CPU cycles?
Programming
Web Development
4 Years Ago
by Dani
Someone posted a comment in the [php
usleep
manual](https://www.php.net/manual/en/function.
usleep
.php) that
usleep
() consumes CPU cycles whereas sleep() and time_nanosleep() do not. Is this true for PHP 7.x?
LCD Control Module Program!
Programming
Software Development
11 Years Ago
by Strange&Evil
… ) { if( attempts < max_send_attempts) {
usleep
(10000); // 100 ms attempts++; } else { return…bufsize) { if( attempt < max_read_attempt ) {
usleep
(1000); attempt++; } else { break; } } …
pthread example program
Programming
Software Development
13 Years Ago
by spetro3387
…&count_cond_mutex); nCount = 0; } pthread_mutex_unlock(&count_cond_mutex);
usleep
(1000); //FOO - do work here or last running thread …&count_cond_mutex); nCount = 0; } pthread_mutex_unlock(&count_cond_mutex);
usleep
(1000); //FOO - do work here or last running thread …
Error during compiling for C++ code
Programming
Software Development
13 Years Ago
by petero_l
…1-r)); cout << total1 << endl;
usleep
(100000); if (k == t) { cout << …1)*d)); cout << total << endl;
usleep
(100000); if (n == x) { cout << …1-d)); cout << total << endl;
usleep
(100000); if (n == x) { cout << …
help debug .... 2 processes not going
Programming
Software Development
19 Years Ago
by jaeSun
… #%i is currently crossing the drawbridge.\n", northID);
usleep
(pausetime); //end CS //************************* //unlock bridge sem_post(&bridge_s… #%i is currently crossing the drawbridge.\n", southID);
usleep
(pausetime); //end CS //************************* //unlock bridge sem_post(&bridge_s…
Guys, plese just one more time help me
Programming
Software Development
14 Years Ago
by dondajr
… (!fbuffer) { //Dorme 1/10 de segundo
usleep
(1000); //Forca retorno ao loop continue; } … a dados no arquivo, dorme 1/10 de segundo
usleep
(1000); //Força inicio do loop continue; }…
Process Scheduler problem in UNIX
Programming
Software Development
13 Years Ago
by lotrsimp12345
… repeat this multiple times. We are only supposed to use
usleep
in the jobgeneration() function. We are having trouble sleeping and…;linePowerUser<<endl; output<<lineUser; output.close();
usleep
(50); } } void jobScheduler(){ int i = 0; int n = 0; int…
Make an array from mysql results. Single column.
Programming
Web Development
12 Years Ago
by reco21
….. [CODE]<?php $request = trim(strtolower($_REQUEST['login'])); //sleep(2);
usleep
(150000); $users = array('asdf', 'Peter', 'Peter2', 'George'); $valid = 'true'; foreach… like below.. [CODE] $request = trim(strtolower($_REQUEST['login'])); //sleep(2);
usleep
(150000); $users = array( ); $query = mysql_query("SELECT login FROM members…
Re: Make an array from mysql results. Single column.
Programming
Web Development
12 Years Ago
by reco21
…) [CODE] <?php $request = trim(strtolower($_REQUEST['login'])); //sleep(2);
usleep
(150000); $users = array('asdf', 'Peter', 'Peter2', 'George'); $valid = 'true'; …('error'); $valid = 'true'; $request = trim(strtolower($_REQUEST['login'])); //sleep(2);
usleep
(150000); $users = array( ); $query = mysql_query("SELECT login FROM members…
SEG FAULT when trying to close ofstream
Programming
Software Development
11 Years Ago
by sidvb1
… IO */ void Logger::DeleteInstance() {
usleep
(100000); pthread_mutex_lock(&mutex); run =… written++; //delete request; } } } pthread_mutex_unlock(&mutex);
usleep
(1000); } } /* * @param * @return * @…
Re: slow down program output
Programming
Software Development
10 Years Ago
by Schol-R-LEA
…want to know, how long are you setting `sleep()`. `
usleep
()`, and `nanosleep()` for, repsectively? While `sleep()` takes an… argument in seconds, `
usleep
()` takes one in microseconds, and `nanosleep()` (as the name…has frozen; OTOH, an argument of `99999` for `
usleep
()` (just under 1/10 of a second) would be…
pass multiple inputs to proc_open pipe in php
Programming
3 Years Ago
by Iikeloa
… = ""; while($n < 3) { echo $commands[$n];
usleep
(1000); fwrite($pipe[0], $commands[$n] . PHP_EOL ); fflush($pipe[0…]);
usleep
(1000); while($out = stream_get_contents($pipe[1]) && !feof($…
Re: Delay
Programming
Software Development
16 Years Ago
by TkTkorrovi
… time which scheduler gives to a program, is 5 milliseconds.
usleep
is defined in unistd.h, and implements delay in microseconds… none of these functions are part of the standard c,
usleep
and select are part of the POSIX standard, and g_usleep…
Re: difficulty in providing delay in gcc compiler
Programming
Software Development
15 Years Ago
by Salem
Well did you take account of the fact that
usleep
takes MICROSECONDS? delay(1000); and
usleep
(1000); will wait for different times.
Re: Process Scheduler problem in UNIX
Programming
Software Development
13 Years Ago
by lotrsimp12345
… queues. The new jobs can be simple print and sleep/
usleep
operations. The job queues may be stored in an external…
Re: Make an array from mysql results. Single column.
Programming
Web Development
11 Years Ago
by reco21
…;../dbcon.php"); $valid = 'true'; $request = trim(strtolower($_REQUEST['user']));
usleep
(150000); $query = mysql_query("SELECT * FROM members WHERE user=\"…
Re: slow down program output
Programming
Software Development
10 Years Ago
by COKEDUDE
I looked at the man pages and saw those were the maximum values of
usleep
() and nanosleep(). With sleep I thought I would get a normal 5 seconds. I am working on a modified version of game of life. It is hard to see if it is doing what I want with how fast it is going.
usleep
(1000000); nanosleep(999999999); delay(3000); sleep(5);
until help
Programming
Software Development
17 Years Ago
by jan1024188
… (a == b) printf("%d\n second ", a); a++;
usleep
( 990000 ); printf("\n\n hvala ker usate ta pgr…
Delay
Programming
Software Development
16 Years Ago
by tu_m.aimes
Is there a delay function for C? I'm using
usleep
, but I just found that somewhere on the net and if I get asked about it, I won't be able to explain or even name which library I'm calling it from. Is there a delay function in time.h? If so, what is it and how do you use it?
Please Help - Reading a file in efficient manner
Programming
Software Development
15 Years Ago
by anjaliraman
…) { if( !m_streamSyslog.getline(pBuffer, nMaxMsgLen) ) { if( m_streamSyslog.eof() ) { m_streamSyslog.clear();
usleep
(100000); } return false; } return true; } void SyslogReader::validateTrap(const string…
difficulty in providing delay in gcc compiler
Programming
Software Development
15 Years Ago
by harry pottervs
… linux i dont know how to provide delay.I used
usleep
() function but i cant see the successive movement of balls…
serial communication RS 232
Programming
Software Development
15 Years Ago
by snehapatil
…("written: %d%d\n", sCmd[0]); close(fd);
usleep
(30000); fd = 0; fd = open( "/dev/ttyS0" ,O_RDONLY…
Problem Passing Sturcture Object To Queue - Linux?
Programming
Software Development
15 Years Ago
by gsuraj02
…<<rcs<<endl; return 0; } while(1) {
usleep
(1600); } } [/code]
Multicasting only works on same machine (urgent)
Programming
Software Development
14 Years Ago
by MadSkyrim
…;sendto() sent a different number of bytes than expected");
usleep
(pulse * 1000); } [/CODE] Any ideas?
Linux sleep();
Programming
Software Development
14 Years Ago
by Slacked
… then writes out the complete sentence. I've tried the
usleep
and nanosleep functions as well, but no satisfaction.
Input without hitting enter
Programming
Software Development
14 Years Ago
by petteyg
… main() { char c; int i=0; nonblock(NB_ENABLE); while(!i) {
usleep
(1); i=kbhit(); if (i!=0) { c=fgetc(stdin); if…
Dining Philosopher Code Has problems
Programming
Software Development
14 Years Ago
by bohongtw
… (true) { sleep(1); for (i = 0; i < number; i++) {
usleep
(1000); printf("%d: %-8s ", i, philosophers[i].status…
PHP sockets from remote host
Programming
Web Development
13 Years Ago
by Kalphiter
…;. $file[1] ."]"); echo("Beep sent\n"); }
usleep
(10000); socket_set_block($sock); $read[0] = $sock; for($i = 0; $i…
how to check if semaphore is lock efficiently
Programming
Software Development
13 Years Ago
by neti1987
… the main thread locked the first semaphore - break the loop.
usleep
(1); // else - wait milisecond and check again. } // continue for the…
Check for user input.
Programming
Software Development
13 Years Ago
by Danny_501
… a fgets() function? Current I have: [CODE] while(keep_running == TRUE) {
usleep
(25); char command[80]; fgets(command,80,stdin); /* handle input…
1
2
3
4
Next
Last
Search
Search
Forum Categories
Hardware/Software
Programming
Digital Media
Community Center
Latest Content
Newest Topics
Latest Topics
Latest Posts
Latest Comments
Top Tags
Topics Feed
Social
Meet People
Forums
Top Members
Community Functions
DaniWeb Premium
Newsletter Archive
Markdown Syntax
Community Rules
Developer APIs
Connect API
Forum API Docs
Tools
SEO Backlink Checker
Legal
Terms of Service
Privacy Policy
FAQ
About Us
Advertise
Contact Us
© 2024 DaniWeb® LLC