aboutsummaryrefslogtreecommitdiff
path: root/src/cmd/acme/time.c
diff options
context:
space:
mode:
authorrsc <devnull@localhost>2004-12-27 00:38:59 +0000
committerrsc <devnull@localhost>2004-12-27 00:38:59 +0000
commit334cb1e91ceb2d667c1cfd0b71aa9801bef089ec (patch)
treed08c04f14c4a76c5d915af7370160b466ed0fdd1 /src/cmd/acme/time.c
parent0a839b83142bba3205fdd5e30d2ba3514aa4513b (diff)
downloadplan9port-334cb1e91ceb2d667c1cfd0b71aa9801bef089ec.tar.gz
plan9port-334cb1e91ceb2d667c1cfd0b71aa9801bef089ec.tar.bz2
plan9port-334cb1e91ceb2d667c1cfd0b71aa9801bef089ec.zip
change to use new thread library
Diffstat (limited to 'src/cmd/acme/time.c')
-rw-r--r--src/cmd/acme/time.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/cmd/acme/time.c b/src/cmd/acme/time.c
index f80891a4..35982b78 100644
--- a/src/cmd/acme/time.c
+++ b/src/cmd/acme/time.c
@@ -50,7 +50,7 @@ timerproc(void *v)
nt = 0;
old = msec();
for(;;){
- threadsleep(1); /* will sleep minimum incr */
+ sleep(1); /* will sleep minimum incr */
new = msec();
dt = new-old;
old = new;
@@ -98,7 +98,8 @@ void
timerinit(void)
{
ctimer = chancreate(sizeof(Timer*), 100);
- threadcreate(timerproc, nil, STACK);
+ chansetname(ctimer, "ctimer");
+ proccreate(timerproc, nil, STACK);
}
Timer*
@@ -112,6 +113,7 @@ timerstart(int dt)
else{
t = emalloc(sizeof(Timer));
t->c = chancreate(sizeof(int), 0);
+ chansetname(t->c, "tc%p", t->c);
}
t->next = nil;
t->dt = dt;