Skip to content

Conversation

@cpoIT
Copy link

@cpoIT cpoIT commented Feb 20, 2019

@Tulf:

  • Kat

printf("%d\n", x);
printf("%d\n", x); // x = 100
x = 10;
// wait(NULL); // if this is commentted result will be different.
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Because it tells the program to wait for the Child to finish. Which is what you want.


/* measure monotonic time */
clock_gettime(CLOCK_MONOTONIC, &start); /* mark start time */
write(fileno(stdout), NULL, 0);
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Very Nice Kat, smart way to just write to your terminal stream.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants