aboutsummaryrefslogtreecommitdiff
path: root/src/lib/_task.rs
diff options
context:
space:
mode:
authorMarijn Haverbeke <[email protected]>2011-05-12 17:24:54 +0200
committerMarijn Haverbeke <[email protected]>2011-05-12 21:30:44 +0200
commit3816e57fd2a8ab19e4ac6d4b3ddd5b49d5973ff2 (patch)
tree508982ed2f789aedd89eebd529343d9dc88b8e01 /src/lib/_task.rs
parentTransitional change to make extfmt output lowercase module name (diff)
downloadrust-3816e57fd2a8ab19e4ac6d4b3ddd5b49d5973ff2.tar.xz
rust-3816e57fd2a8ab19e4ac6d4b3ddd5b49d5973ff2.zip
Downcase std modules again, move to :: for module dereferencing
This should be a snapshot transition.
Diffstat (limited to 'src/lib/_task.rs')
-rw-r--r--src/lib/_task.rs21
1 files changed, 21 insertions, 0 deletions
diff --git a/src/lib/_task.rs b/src/lib/_task.rs
new file mode 100644
index 00000000..b6b754f0
--- /dev/null
+++ b/src/lib/_task.rs
@@ -0,0 +1,21 @@
+native "rust" mod rustrt {
+ fn task_sleep(uint time_in_us);
+}
+
+/**
+ * Hints the scheduler to yield this task for a specified ammount of time.
+ *
+ * arg: time_in_us maximum number of microseconds to yield control for
+ */
+fn sleep(uint time_in_us) {
+ ret rustrt::task_sleep(time_in_us);
+}
+
+// Local Variables:
+// mode: rust;
+// fill-column: 78;
+// indent-tabs-mode: nil
+// c-basic-offset: 4
+// buffer-file-coding-system: utf-8-unix
+// compile-command: "make -k -C .. 2>&1 | sed -e 's/\\/x\\//x:\\//g'";
+// End: