`
langzhe
  • 浏览: 288120 次
  • 性别: Icon_minigender_1
  • 来自: 北京
社区版块
存档分类
最新评论

timer:send_after

阅读更多

gen_server 代码片段
 init([Host, _Opts]) -> 
       timer:send_after(5000, self(), {writing_db}),      
      {ok, #state{}}.     
 handle_info({writing_db}, State) ->
       timer:send_after(5000, self(), {writing_db}),  
       ...............

{noreply, State};
 http://blog.yufeng.info/archives/tag/start_timer

 

0
2
分享到:
评论

相关推荐

    erlang的timer和实现机制

    首先,`timer`模块的主要函数包括`tc/1,2,3`(测试调用)、`send_after/3,4`(发送消息后延迟)、`apply_after/4`(应用函数后延迟)、`cancel_timer/1`(取消定时器)等。这些函数让开发者能够灵活地设置定时事件,...

    timer.rs:Rust计时器的简单实现

    计时器 在Rust中以及针对Rust的Timer的简单实现。例子 extern crate timer;extern crate chrono;... send (()). unwrap ();});rx. recv (). unwrap ();println! ( "This code has been executed after 3 seconds" );

    EurekaLog_7.5.0.0_Enterprise

    5)....Fixed: Dialog auto-close timer may reset without user input 6)....Fixed: Possible hang when quickly loading/unloading EurekaLog-enabled DLL 7)....Fixed: Possible hang in COM DLLs 8)....Fixed: ...

    LCTF软件备份VariSpec™ Liquid Crystal Tunable Filters

    In earlier revisions, the error status light was cleared after a VsSetWavelength() call failed, so the user did not see the light turn red to alert that an error had occurred. This has been fixed in ...

    BobBuilder_app

    After testing and comparing to the internal .net SortedDictionary (which is a Red-Black tree structure) it was slower and so scrapped (see the performance comparisons). I decided against using ...

    CE中文版-启点CE过NP中文.exe

    Autoattach now happens using a thread instead of a gui blocking timer Some colorscheme enhancements Added a DBVM based "Find what writes/accesses" feature. (For pro users, enable kernelmode options ...

    freemarker总结

    JAVA模版引擎Freemarker常用标签(一) 1. if指令 这是一个典型的分支控制指令,该指令的作用完全类似于Java语言中的if,if指令的语法格式如下: <#if condition>... <#elseif condition>... <#elseif condition>......

    Bochs - The cross platform IA-32 (x86) emulator

    - Added Bochs compilation timestamp after Bochs version string. - GUI and display libraries (Volker) - Added new .bochsrc option to select mouse capture toggle method. In addition to the default ...

    计算机网络第六版答案

    After finding the vulnerability, the attacker needs to scan for hosts that are vulnerable. The target is basically to compromise a series of systems by exploiting that particular vulnerability. Any ...

    ICS delphixe10源码版

    send cash (Euro currency or US Dollars) in an envelop to my street address or buy a gift certificate at Amazon in the UK. I will then use it to buy books. Here is the direct URL at Amazon UK (nearest ...

    win3.x 下的wing 玩某些老游戏必备比如孔明传

    the bin directory of the SDK and send the generated report to wingbug@microsoft.com. Updated information on WinG is available on CompuServe in the WINMM forum and on ftp.microsoft.com. Known Bugs ...

    BURNINTEST--硬件检测工具

    - Added an operation watchdog timer for all tests. In rare cases, a single test can stop in the operating system - i.e. there is a problem in the operating system/ device driver that prevents ...

    js使用小技巧

    定时 timer=setInterval("scrollwindow()",delay); clearInterval(timer); UNCODE编码 escape() ,unescape 父对象 obj.parentElement(dhtml) obj.parentNode(dom) 交换表的行 TableID.moveRow(2,1) 替换...

    VB编程资源大全(英文源码 网络)

    inteferorprovider.zip program which communicates with each other and allows one computer to perform a task on the other<END><br>17 , itimer.zip Internet Timer. Also calculates the cost of the ...

    VB编程资源大全(英文源码 其它)

    <END><br>65,ExpProject.zip This project will protect your software from illegal use after the evaluation period is over. <END><br>66,MessageBoxDll.zip This is a custom message box creator.It ...

    C# Game Programming Cookbook for Unity 3D - 2014

    4.2 The Timer Class....................................................43 4.2.1 Script Breakdown..........................................45 4.3 Spawn Scripts.............................................

Global site tag (gtag.js) - Google Analytics