Git Product home page Git Product logo

libevent-comment's Issues

关于timer的一个问题

你好,看了你的注释对我理解代码帮助很大。但是在看的时候我有一个小问题,就是假如我注册了两个超时事件分别是2s和4s,目前系统的时间是100,也就是在102触发第一个事件104触发第二个事件。假如现在102到了触发了第一个超时事件,然后设置了tv_cache=102,但是在调用第一个事件的回调函数时花了4s,也就是实际的时间到了106。在设置第二个超时事件是,即timeout_next(base, &tv_p); 里面使用的系统时间还是102,但是实际了时间已经到106了本应该直接激活的,但是还是放在epoll_wait里面等待了2s才激活。就是这里我有点想不明白,能不能给我解答一下。谢谢!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.