Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

faketime would change the system tick time to unix timestamp ? #440

Open
mrmgxxxx opened this issue Nov 13, 2023 · 3 comments
Open

faketime would change the system tick time to unix timestamp ? #440

mrmgxxxx opened this issue Nov 13, 2023 · 3 comments

Comments

@mrmgxxxx
Copy link

my a.out which is a simple test tools, it could show the local CLOCK_MONOTONIC time, and it works like:

image

but I run the faketime command, the tick CLOCK_MONOTONIC time would be changed to unix timestamp,

image

Is that a problem or did I miss the applicable instructions?

@mrmgxxxx
Copy link
Author

mrmgxxxx commented Nov 13, 2023

a.out code:

#include <stdio.h>
#include <time.h>

int main() 
{
    struct timespec current_time;

    clock_gettime(CLOCK_MONOTONIC, &current_time);

    printf("Current tick time: %lld.%09ld seconds since epoch\n", (long long)current_time.tv_sec, current_time.tv_nsec);

    return 0;
}

@mrmgxxxx
Copy link
Author

faketime version:

Version 0.9.10

@mrmgxxxx
Copy link
Author

Is there any way not to change the tick time?

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

No branches or pull requests

1 participant