libfaketime | libfaketime modifies the system time for a single application | Date Time Utils library

 by   wolfcw C Version: v0.9.10 License: GPL-2.0

kandi X-RAY | libfaketime Summary

kandi X-RAY | libfaketime Summary

libfaketime is a C library typically used in Utilities, Date Time Utils applications. libfaketime has no bugs, it has no vulnerabilities, it has a Strong Copyleft License and it has medium support. You can download it from GitHub.

Usage a) Basics b) Using absolute dates c) Using start at dates d) Using offsets for relative dates e) Advanced features and caveats f) Faking the date and time system-wide g) Using the "faketime" wrapper script h) "Limiting" libfaketime based on elapsed time or number of calls. Running "make" compiles both library versions and a test program, which it then also executes. If the test works fine, you should copy the libfaketime libraries (libfaketime.so.1, and libfaketimeMT.so.1) to the place you want them in. Running "make install" will attempt to place them in /usr/local/lib/faketime and will install the wrapper shell script "faketime" in /usr/local/bin, both of which most likely will require root privileges. However, from a technical point of view, there is no necessity for a system-wide installation, so you can use libfaketime also on machines where you do not have root privileges. You may want to adjust the PREFIX variable in the Makefiles accordingly. By default, the Makefile compiles/links libfaketime for your default system architecture. If you need to build, e.g., 32-bit files on a 64-bit platform, please see the notes about CFLAGS and LDFLAGS in src/Makefile. Since version 0.6, system calls to file timestamps are also intercepted, thanks to a contribution by Philipp Hachtmann. This is especially useful in combination with relative time offsets as explained in section 4d) below, if a program writes and reads files whose timestamps also shall be faked. If you do not need this feature or if it confuses the application you want to use FTPL with, define the environment variable NO_FAKE_STAT, and the intercepted stat calls will be passed through unaltered. On macOS, it is necessary to compile differently, due to the different behavior dyld has. Use the Makefile.OSX file provided to compile libfaketime.1.dylib. Additionally, instead of using LD_PRELOAD, the variable DYLD_INSERT_LIBRARIES should be set to the path to libfaketime.1.dylib, and the variable DYLD_FORCE_FLAT_NAMESPACE should be set (to anything). macOS users should read README.OSX for additional details.
Support
    Quality
      Security
        License
          Reuse

            kandi-support Support

              libfaketime has a medium active ecosystem.
              It has 2329 star(s) with 289 fork(s). There are 53 watchers for this library.
              OutlinedDot
              It had no major release in the last 12 months.
              There are 19 open issues and 278 have been closed. On average issues are closed in 88 days. There are no pull requests.
              It has a neutral sentiment in the developer community.
              The latest version of libfaketime is v0.9.10

            kandi-Quality Quality

              libfaketime has 0 bugs and 0 code smells.

            kandi-Security Security

              libfaketime has no vulnerabilities reported, and its dependent libraries have no vulnerabilities reported.
              libfaketime code analysis shows 0 unresolved vulnerabilities.
              There are 0 security hotspots that need review.

            kandi-License License

              libfaketime is licensed under the GPL-2.0 License. This license is Strong Copyleft.
              Strong Copyleft licenses enforce sharing, and you can use them when creating open source projects.

            kandi-Reuse Reuse

              libfaketime releases are available to install and integrate.
              Installation instructions are not available. Examples and code snippets are available.

            Top functions reviewed by kandi - BETA

            kandi's functional review helps you automatically verify the functionalities of the libraries and avoid rework.
            Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of libfaketime
            Get all kandi verified functions for this library.

            libfaketime Key Features

            No Key Features are available at this moment for libfaketime.

            libfaketime Examples and Code Snippets

            No Code Snippets are available at this moment for libfaketime.

            Community Discussions

            Trending Discussions on libfaketime

            QUESTION

            Python: gevent and libfaketime
            Asked 2021-Jun-04 at 20:57

            At work I am transitioning a system from an older version of Python, and as a part of that I need to upgrade gevent to version 21.1.2.

            Some of our tests use libfaketime.fake_time and time.sleep in the code being tested. However, with the new gevent version these sleeps sleep forever, probably because time doesn't change. The time module does get patched.

            Is there a way to make it sleep for the required period of time and then wake up?

            ...

            ANSWER

            Answered 2021-Jun-04 at 20:57

            Use gevent.sleep not time.sleep. You can always wrap anything around a Timeout as well:

            Source https://stackoverflow.com/questions/67672664

            Community Discussions, Code Snippets contain sources that include Stack Exchange Network

            Vulnerabilities

            No vulnerabilities reported

            Install libfaketime

            You can download it from GitHub.

            Support

            Bug reports, feature suggestions, success reports, and patches/pull requests are highly appreciated:.
            Find more information at:

            Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items

            Find more libraries

            Stay Updated

            Subscribe to our newsletter for trending solutions and developer bootcamps

            Agree to Sign up and Terms & Conditions

            Share this Page

            share link

            Explore Related Topics

            Consider Popular Date Time Utils Libraries

            moment

            by moment

            dayjs

            by iamkun

            date-fns

            by date-fns

            Carbon

            by briannesbitt

            flatpickr

            by flatpickr

            Try Top Libraries by wolfcw

            vimr.mmbundle

            by wolfcwShell