summaryrefslogtreecommitdiff
path: root/iotest/src/iotest.cpp
diff options
context:
space:
mode:
authorguest <guest@c30cbac5-9f56-4f76-8ed5-5c34e48a65ae>2007-10-23 15:02:21 +0000
committerguest <guest@c30cbac5-9f56-4f76-8ed5-5c34e48a65ae>2007-10-23 15:02:21 +0000
commit82cd9d0b1c3140af30518fcc28af539fac5906ae (patch)
treedc48a4ea4f35c9023ab91a5ed726faac40d1f954 /iotest/src/iotest.cpp
parent507481336146ca188a9a9d9d1548d5dc81539a60 (diff)
git-svn-id: svn+ssh://mecka.net/home/svn/dds@16 c30cbac5-9f56-4f76-8ed5-5c34e48a65ae
Diffstat (limited to 'iotest/src/iotest.cpp')
-rw-r--r--iotest/src/iotest.cpp19
1 files changed, 13 insertions, 6 deletions
diff --git a/iotest/src/iotest.cpp b/iotest/src/iotest.cpp
index a3b3337..491fd01 100644
--- a/iotest/src/iotest.cpp
+++ b/iotest/src/iotest.cpp
@@ -7,21 +7,28 @@
//============================================================================
#include <iostream>
-
+#include <time.h>
#include "diasio.h"
using namespace std;
int main() {
- cout << "!!!Hello World!!!" << endl; // prints !!!Hello World!!!
DIASIO dias;
- int counter = 0;
+ int state = 0;
+ struct timespec halfmsec;
+ halfmsec.tv_sec = 0;
+ halfmsec.tv_nsec = 500000;
- while(counter < 255){
- dias.set(counter);
- counter++;
+ while(1){
+ dias.set(state);
+ if(state == 0x00)
+ state = 0xff;
+ else
+ state = 0x00;
+
+ nanosleep(&halfmsec, NULL);
}
return 0;