Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <unistd.h>
- #include <stdio.h>
- void fast() {
- int i;
- for (i = 0; i < 2000; i++)
- printf("Doing some fast work %d\n", i);
- }
- void slow() {
- printf("Doing some slow non-CPU-bound work\n");
- sleep(3);
- }
- int main() {
- fast();
- slow();
- fast();
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement