From: Epiphanov Sergei <serpiph@nikiet.ru>
To: ALT Linux Sisyphus discussion list <sisyphus@altlinux.ru>
Subject: Re: [sisyphus] USB on 2.4.x
Date: Wed, 2 Feb 2005 17:47:14 +0300
Message-ID: <200502021747.14473.serpiph@nikiet.ru> (raw)
In-Reply-To: <4200D53F.7060509@altlinux.com>
[-- Attachment #1: Type: text/plain, Size: 147 bytes --]
В сообщении от 2 Февраль 2005 16:27 Anton Farygin написал:
> Программу в студию ;-)
Вот она (приложена).
--
С уважением, Епифанов Сергей
[-- Attachment #2: speed.cpp --]
[-- Type: text/x-c++src, Size: 933 bytes --]
#include <string.h>
#include <sys/time.h>
#include <sys/resource.h>
#include <signal.h>
#include <stdio.h>
#include <unistd.h>
struct timeval getTV;
struct timezone getTZ;
double prevValue=0.0, curValue=0.0;
void sigHand( int i ){
gettimeofday( &getTV, &getTZ );
prevValue = curValue;
curValue = getTV.tv_sec+(double)getTV.tv_usec/1.0e6;
}
int main( int argc, char ** argv ) {
::setpriority( PRIO_PROCESS, 0, -19 );
struct sigaction sa;
memset( &sa, 0, sizeof(sa) );
sa.sa_handler = sigHand;
sigaction( SIGALRM, &sa, NULL );
struct itimerval tv;
tv.it_interval.tv_sec = 0;
tv.it_interval.tv_usec = 30000;
tv.it_value.tv_sec = 0;
tv.it_value.tv_usec = 30000;
setitimer( ITIMER_REAL, &tv, NULL );
while( 1 ) {
pause();
// printf("%10.3f\n",curValue);
printf("Cur=%16.6fs, Prev=%16.6fs, delta=%8.3fms\n",curValue,prevValue,(curValue-prevValue)*1.0e3);
}
}
next prev parent reply other threads:[~2005-02-02 14:47 UTC|newest]
Thread overview: 33+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-02-01 22:14 Andrey Brindeew
2005-02-01 22:47 ` Vitaly Lipatov
2005-02-02 2:03 ` Ivan Fedorov
2005-02-02 5:46 ` Vitaly Lipatov
2005-02-02 7:17 ` Gleb Kulikov
2005-02-02 10:27 ` Alexandre Prokoudine
2005-02-02 14:45 ` Gleb Kulikov
2005-02-02 11:45 ` iLL
2005-02-02 12:06 ` Epiphanov Sergei
2005-02-02 12:45 ` iLL
2005-02-02 13:09 ` Epiphanov Sergei
2005-02-02 13:27 ` Anton Farygin
2005-02-02 14:47 ` Epiphanov Sergei [this message]
2005-02-02 16:10 ` Anton Farygin
2005-02-03 8:21 ` Epiphanov Sergei
2005-02-03 10:58 ` Epiphanov Sergei
2005-02-03 12:33 ` [sisyphus] timers on 2.6.x vs 2.4.x (was: Re: USB on 2.4.x) Sergey Vlasov
2005-02-03 13:41 ` Epiphanov Sergei
2005-02-03 12:32 ` [sisyphus] USB on 2.4.x Epiphanov Sergei
2005-02-02 14:43 ` Gleb Kulikov
2005-02-02 22:12 ` Vitaly Lipatov
2005-02-03 7:59 ` Gleb Kulikov
2005-02-03 9:59 ` Vitaly Lipatov
2005-02-07 19:20 ` Serge Pavlovsky
2005-02-02 14:39 ` Gleb Kulikov
2005-02-02 15:42 ` [sisyphus] " Konstantin A. Lepikhov
2005-02-02 7:34 ` [sisyphus] Mosix (was: USB on 2.4.x) iLL
2005-02-03 5:24 ` [sisyphus] USB on 2.4.x Andrey Brindeew
2005-02-03 5:34 ` Ivan Fedorov
2005-02-03 8:21 ` Valery V. Inozemtsev
2005-02-03 13:45 ` Anton Farygin
2005-02-08 17:10 ` Maxim Tyurin
2005-02-02 6:35 ` Alex Yustasov
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=200502021747.14473.serpiph@nikiet.ru \
--to=serpiph@nikiet.ru \
--cc=sisyphus@altlinux.ru \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
ALT Linux Sisyphus discussions
This inbox may be cloned and mirrored by anyone:
git clone --mirror http://lore.altlinux.org/sisyphus/0 sisyphus/git/0.git
# If you have public-inbox 1.1+ installed, you may
# initialize and index your mirror using the following commands:
public-inbox-init -V2 sisyphus sisyphus/ http://lore.altlinux.org/sisyphus \
sisyphus@altlinux.ru sisyphus@altlinux.org sisyphus@lists.altlinux.org sisyphus@lists.altlinux.ru sisyphus@lists.altlinux.com sisyphus@linuxteam.iplabs.ru sisyphus@list.linux-os.ru
public-inbox-index sisyphus
Example config snippet for mirrors.
Newsgroup available over NNTP:
nntp://lore.altlinux.org/org.altlinux.lists.sisyphus
AGPL code for this site: git clone https://public-inbox.org/public-inbox.git