{"id":115863,"date":"2026-10-20T13:41:10","date_gmt":"2026-10-20T05:41:10","guid":{"rendered":"https:\/\/www.wsisp.com\/helps\/115863.html"},"modified":"2026-10-20T13:41:10","modified_gmt":"2026-10-20T05:41:10","slug":"%e4%bb%bfmuduo%e5%ae%9e%e7%8e%b0%e9%ab%98%e5%b9%b6%e5%8f%91%e6%9c%8d%e5%8a%a1%e5%99%a8-%e6%97%b6%e9%97%b4%e8%bd%aetimewheel-cpp","status":"publish","type":"post","link":"https:\/\/www.wsisp.com\/helps\/115863.html","title":{"rendered":"\u4effmuduo\u5b9e\u73b0\u9ad8\u5e76\u53d1\u670d\u52a1\u5668\u2014\u2014\u65f6\u95f4\u8f6etimewheel.cpp"},"content":{"rendered":"<p>        \/* MD \/ \u5bcc\u6587\u672c\u4e2d\u7684 .toc\uff08\u542b\u535a\u5ba2\u56ed\u642c\u5bb6\u7b49\u5d4c\u5957\u7ed3\u6784\uff09\uff1b.toc-box \u5728\u4fa7\u680f\uff0c\u4e0d\u53d7\u5f71\u54cd *\/<br \/>\n        #content_views .toc,<br \/>\n        \/* \u7f16\u8f91\u5668\u5e38\u5728\u76ee\u5f55\u524d\u540e\u63d2\u5165\u7a7a p\uff08:empty \u4ecd\u5360 20px\uff09\uff0c\u4e00\u5e76\u53bb\u6389\u907f\u514d\u9876\u7a7a\u9699 *\/<br \/>\n        #content_views.markdown_views &gt; p:empty:has(+ .toc),<br \/>\n        #content_views.markdown_views &gt; .toc + p:empty,<br \/>\n        \/* \u5bcc\u6587\u672c\u65e7\u7248\u76ee\u5f55\u6807\u8bb0 *\/<br \/>\n        #content_views.htmledit_views #main-toc,<br \/>\n        #content_views.htmledit_views #hr-toc,<br \/>\n        #content_views.htmledit_views p[id*=\\&#8221;-toc\\&#8221;] {<br \/>\n          display: none !important;<br \/>\n        }<br \/>\n        \/* \u76ee\u5f55\u53bb\u6389\u540e\uff0c\u7d27\u8ddf\u7684\u9996\u4e2a\u6807\u9898\u4e0d\u518d\u591a\u51fa\u4e00\u5757\u4e0a\u8fb9\u8ddd *\/<br \/>\n        #content_views.markdown_views &gt; .toc + h1,<br \/>\n        #content_views.markdown_views &gt; .toc + h2,<br \/>\n        #content_views.markdown_views &gt; .toc + h3,<br \/>\n        #content_views.markdown_views &gt; .toc + h4,<br \/>\n        #content_views.markdown_views &gt; .toc + p:empty + h1,<br \/>\n        #content_views.markdown_views &gt; .toc + p:empty + h2,<br \/>\n        #content_views.markdown_views &gt; .toc + p:empty + h3,<br \/>\n        #content_views.markdown_views &gt; .toc + p:empty + h4 {<br \/>\n          margin-top: 0 !important;<br \/>\n        }<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/10\/20261020054107-6ad6fef3a25a6.png\" alt=\"@bit::Shadow \u2727(\u2256 \u25e1 \u2256\u273f\" width=\"300\" height=\"300\" \/> <\/p>\n<h4>\u76ee\u5f55<\/h4>\n<ul>\n<li>\n<ul>\n<li>\u6458\u8981<\/li>\n<li>1. \u67b6\u6784\u4e0e\u6587\u4ef6\u6784\u6210<\/li>\n<li>2. TimerTask<\/li>\n<li>3. bug1&#xff1a;\u6784\u9020\u987a\u5e8f<\/li>\n<li>4. bug2&#xff1a;TimerAdd \u4e0e Refresh<\/li>\n<li>5. bug5&#xff1a;TickRun<\/li>\n<li>6. bug3\u3001bug4&#xff1a;\u4e24\u5957\u7d22\u5f15<\/li>\n<li>7. \u603b\u7ed3<\/li>\n<li>8. \u5e38\u89c1\u95ee\u9898<\/li>\n<li>9. \u6807\u7b7e<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<p># timewheel.cpp \u6e90\u7801\u8d70\u67e5&#xff1a;TimerTask \u4e0e TimeWheel<\/p>\n<h3>\u6458\u8981<\/h3>\n<p>\u5355\u6587\u4ef6\u65f6\u95f4\u8f6e&#xff1a;TimerTask \u6301 id\u3001\u8d85\u65f6\u4e0e\u56de\u8c03&#xff0c;\u6790\u6784\u4e2d\u6267\u884c\u4efb\u52a1&#xff1b;TimeWheel \u7528 _timers \u4e0e _wheel \u4e24\u5957\u7d22\u5f15&#xff0c;\u5916\u90e8\u6bcf\u79d2 TickRun \u9a71\u52a8\u3002<\/p>\n<h3>1. \u67b6\u6784\u4e0e\u6587\u4ef6\u6784\u6210<\/h3>\n<p>\u4e24\u4e2a\u7c7b&#xff1a;TimerTask\u3001TimeWheel\u3002_timers \u7ba1 id&#xff0c;_wheel \u7ba1\u65f6\u95f4\u4f4d\u7f6e\u3002main\u3001TimerAdd\u3001\u6bcf\u79d2 TickRun&#xff1b;\u5230\u671f\u65f6 clear() \u91ca\u653e\u8be5\u4f4d\u7f6e PtrTask&#xff0c;\u65e0\u5176\u4ed6\u5f3a\u5f15\u7528\u5219 ~TimerTask \u6267\u884c\u4efb\u52a1&#xff0c;_release \u56de\u8c03 RemoveTimer\u3002<\/p>\n<p>\u3010\u6d41\u7a0b\u56fe\u5360\u4f4d&#xff1a;\u5168\u94fe\u8def&#xff1b;\u8282\u70b9&#xff1a;main \u5faa\u73af sleep \u2192 TickRun \u2192 (_tick&#043;1)%_capacity \u2192 clear \u2192 ~TimerTask \u2192 RemoveTimer\u3011<\/p>\n<h3>2. TimerTask<\/h3>\n<p>_cancel \u51b3\u5b9a\u4e24\u5904&#xff1a;\u6790\u6784\u4e2d\u4e3a true \u65f6\u63d0\u524d return&#xff0c;\u56de\u8c03\u5747\u4e0d\u6267\u884c&#xff1b;SetRealese \u62d2\u7edd\u8bbe\u7f6e\u3002SetCancel \u72b6\u6001\u672a\u53d8\u65f6\u8fd4\u56de false\u3002<\/p>\n<p>\u6458\u5f55&#xff08;timewheel.cpp&#xff0c;TimerTask::SetCancel&#xff09;&#xff1a;<\/p>\n<p>    <span class=\"token keyword\">bool<\/span><br \/>\n    <span class=\"token function\">SetCancel<\/span> <span class=\"token punctuation\">(<\/span><span class=\"token keyword\">bool<\/span> b<span class=\"token punctuation\">)<\/span><br \/>\n    <span class=\"token punctuation\">{<\/span><br \/>\n        <span class=\"token keyword\">if<\/span> <span class=\"token punctuation\">(<\/span>b <span class=\"token operator\">&#061;&#061;<\/span> _cancel<span class=\"token punctuation\">)<\/span><br \/>\n            <span class=\"token punctuation\">{<\/span><br \/>\n                spdlog<span class=\"token double-colon punctuation\">::<\/span><span class=\"token function\">info<\/span> <span class=\"token punctuation\">(<\/span><span class=\"token string\">&#034;SetCancel error \u5df2\u7ecfset\u8fc7&#034;<\/span><span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">;<\/span><br \/>\n                <span class=\"token keyword\">return<\/span> <span class=\"token boolean\">false<\/span><span class=\"token punctuation\">;<\/span><br \/>\n            <span class=\"token punctuation\">}<\/span><br \/>\n        _cancel <span class=\"token operator\">&#061;<\/span> b<span class=\"token punctuation\">;<\/span><br \/>\n        <span class=\"token keyword\">return<\/span> <span class=\"token boolean\">true<\/span><span class=\"token punctuation\">;<\/span><br \/>\n    <span class=\"token punctuation\">}<\/span><\/p>\n<h3>3. bug1&#xff1a;\u6784\u9020\u987a\u5e8f<\/h3>\n<p>\u58f0\u660e\u5e8f _tick\u3001_capacity\u3001_timers\u3001_wheel&#xff1b;\u6784\u9020\u5217\u8868 _wheel(_capacity) \u4f9d\u8d56 _capacity \u5148\u58f0\u660e\u3002<\/p>\n<p>\u6458\u5f55&#xff08;timewheel.cpp&#xff0c;TimeWheel \u79c1\u6709\u6210\u5458&#xff09;&#xff1a;<\/p>\n<p>  <span class=\"token keyword\">private<\/span><span class=\"token operator\">:<\/span><br \/>\n    <span class=\"token keyword\">int<\/span> _tick<span class=\"token punctuation\">;<\/span>          <span class=\"token comment\">\/\/ \u6ef4\u7b54\u4e0b\u6807<\/span><br \/>\n    <span class=\"token keyword\">uint64_t<\/span> _capacity<span class=\"token punctuation\">;<\/span> <span class=\"token comment\">\/\/ \u8868\u76d8\u6700\u5927\u6570\u91cf&#8212;\u5176\u5b9e\u5c31\u662f\u6700\u5927\u5ef6\u8fdf\u65f6\u95f4<\/span><br \/>\n    <span class=\"token comment\">\/\/ Hash-\u901a\u8fc7id\u8fdb\u884c\u7ba1\u7406 blog\u5206\u6790&#x1f50d;\u9500\u6bc1(shared_ptr\u4e0eweak_ptr)<\/span><br \/>\n    std<span class=\"token double-colon punctuation\">::<\/span>unordered_map<span class=\"token operator\">&lt;<\/span><span class=\"token keyword\">uint64_t<\/span><span class=\"token punctuation\">,<\/span> WeakTask<span class=\"token operator\">&gt;<\/span><br \/>\n        _timers<span class=\"token punctuation\">;<\/span> <span class=\"token comment\">\/\/ &lt;id,weak_ptr&gt; \u7ba1\u7406\u9500\u6bc1\u4e0e\u521b\u5efa<\/span><br \/>\n    std<span class=\"token double-colon punctuation\">::<\/span>vector<span class=\"token operator\">&lt;<\/span>std<span class=\"token double-colon punctuation\">::<\/span>vector<span class=\"token operator\">&lt;<\/span>PtrTask<span class=\"token operator\">&gt;&gt;<\/span><br \/>\n        _wheel<span class=\"token punctuation\">;<\/span> <span class=\"token comment\">\/\/ \u4e8c\u7ef4\u65f6\u95f4\u8f6e<\/span><\/p>\n<p>\u3010bug1\u3011&#xff1a;\u672a\u987e\u53ca\u521d\u59cb\u5316\u987a\u5e8f&#xff0c;\u9519\u8bef\u7684\u4ee5\u201c\u8bfb\u987a\u5e8f\u4f18\u5148\u201d<\/p>\n<h3>4. bug2&#xff1a;TimerAdd \u4e0e Refresh<\/h3>\n<p>TimerAdd&#xff1a;\u67e5 _timers \u53bb\u91cd&#xff0c;SetRealese \u7ed1 RemoveTimer&#043;this&#043;id&#xff0c;\u63d2\u5165 _wheel[delay]\u3002Refresh&#xff1a;pos &#061; \u8d85\u65f6 &#043; _tick \u53d6\u6a21 _capacity&#xff0c;\u518d\u5934\u63d2\u540c\u4e00 PtrTask\u3002<\/p>\n<p>\u6458\u5f55&#xff08;timewheel.cpp&#xff0c;TimeWheel::TimerAdd&#xff09;&#xff1a;<\/p>\n<p>        pt<span class=\"token operator\">-&gt;<\/span><span class=\"token function\">SetRealese<\/span> <span class=\"token punctuation\">(<\/span>std<span class=\"token double-colon punctuation\">::<\/span><span class=\"token function\">bind<\/span> <span class=\"token punctuation\">(<\/span><span class=\"token operator\">&amp;<\/span>TimeWheel<span class=\"token double-colon punctuation\">::<\/span>RemoveTimer<span class=\"token punctuation\">,<\/span> <span class=\"token keyword\">this<\/span><span class=\"token punctuation\">,<\/span> id<span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">;<\/span><br \/>\n        <span class=\"token comment\">\/\/ _wheel[delay].push_back (pt);<\/span><br \/>\n        _wheel<span class=\"token punctuation\">[<\/span>delay<span class=\"token punctuation\">]<\/span><span class=\"token punctuation\">.<\/span><span class=\"token function\">insert<\/span> <span class=\"token punctuation\">(<\/span>_wheel<span class=\"token punctuation\">[<\/span>delay<span class=\"token punctuation\">]<\/span><span class=\"token punctuation\">.<\/span><span class=\"token function\">begin<\/span> <span class=\"token punctuation\">(<\/span><span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">,<\/span> pt<span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">;<\/span><\/p>\n<p>\u3010bug2\u3011&#xff1a;\u5bf9\u7ed3\u6784\u4e0d\u719f\u6089&#xff0c;\u5199\u4ee3\u7801\u7eaf\u7cb9\u7684\u4e0d\u7ec6\u5fc3\u3002<\/p>\n<h3>5. bug5&#xff1a;TickRun<\/h3>\n<p>TickRun&#xff1a;\u904d\u5386 _wheel[(_tick &#043; 1) % _capacity]&#xff0c;\u9010\u4e2a SetCancel(false)&#xff1b;\u8fd4\u56de true \u8bb0 flag\u2013&#xff0c;flag &lt; 0 \u65f6\u6253\u5370\u5e76 return&#xff0c;_tick \u4e0d\u524d\u8fdb&#xff1b;\u5426\u5219 _tick \u524d\u8fdb\u4e00\u683c\u5e76 clear()\u3002<\/p>\n<p>\u6458\u5f55&#xff08;timewheel.cpp&#xff0c;TimeWheel::TickRun&#xff09;&#xff1a;<\/p>\n<p>        <span class=\"token keyword\">for<\/span> <span class=\"token punctuation\">(<\/span><span class=\"token keyword\">auto<\/span> <span class=\"token operator\">&amp;<\/span>e <span class=\"token operator\">:<\/span> _wheel<span class=\"token punctuation\">[<\/span><span class=\"token punctuation\">(<\/span>_tick <span class=\"token operator\">&#043;<\/span> <span class=\"token number\">1<\/span><span class=\"token punctuation\">)<\/span> <span class=\"token operator\">%<\/span> _capacity<span class=\"token punctuation\">]<\/span><span class=\"token punctuation\">)<\/span><br \/>\n            <span class=\"token punctuation\">{<\/span><br \/>\n                <span class=\"token comment\">\/\/ if (!e-&gt;SetCancel (true))\u53ef\u4ee5\u5417&#xff1f;  bug5 \u4e0d\u53ef\u4ee5&#xff01;&#xff01;<\/span><br \/>\n                <span class=\"token keyword\">if<\/span> <span class=\"token punctuation\">(<\/span>e<span class=\"token operator\">-&gt;<\/span><span class=\"token function\">SetCancel<\/span> <span class=\"token punctuation\">(<\/span><span class=\"token boolean\">false<\/span><span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">)<\/span><\/p>\n<p>\u3010bug5\u3011&#xff1a;\u60f3\u8981\u590d\u7528\u903b\u8f91&#xff0c;\u590d\u7528\u4ec5\u5b58\u5728\u4e00\u79cd\u6709\u6548\u65b9\u6cd5<\/p>\n<p>\u3010\u6d41\u7a0b\u56fe\u5360\u4f4d&#xff1a;TickRun \u5355\u6b21\u63a8\u8fdb&#xff1b;\u8282\u70b9&#xff1a;\u5b9a\u4e0b\u6807 (_tick&#043;1)%_capacity \u2192 \u904d\u5386 SetCancel \u2192 \u5931\u8d25\u8ba1\u6570 \u2192 _tick \u524d\u8fdb \u2192 clear()\u3011<\/p>\n<h3>6. bug3\u3001bug4&#xff1a;\u4e24\u5957\u7d22\u5f15<\/h3>\n<p>RemoveTimer \u7ecf _release \u8c03\u7528&#xff1a;find \u5931\u8d25\u6253\u5370 remove error&#xff0c;\u6210\u529f\u5219 erase(id)\u3002SetCanCel&#xff1a;lock() \u53d6 GetTimeOut() \u5f97 pos&#xff0c;\u518d\u904d\u5386 _wheel[pos] \u9010\u4e2a SetCancel(true)\u3002<\/p>\n<p>\u6458\u5f55&#xff08;timewheel.cpp&#xff0c;TimeWheel::RemoveTimer \/ SetCanCel&#xff09;&#xff1a;<\/p>\n<p>        <span class=\"token keyword\">auto<\/span> it <span class=\"token operator\">&#061;<\/span> _timers<span class=\"token punctuation\">.<\/span><span class=\"token function\">find<\/span> <span class=\"token punctuation\">(<\/span>id<span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">;<\/span><br \/>\n        <span class=\"token keyword\">if<\/span> <span class=\"token punctuation\">(<\/span>it <span class=\"token operator\">&#061;&#061;<\/span> _timers<span class=\"token punctuation\">.<\/span><span class=\"token function\">end<\/span> <span class=\"token punctuation\">(<\/span><span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">)<\/span><br \/>\n            <span class=\"token punctuation\">{<\/span><br \/>\n                spdlog<span class=\"token double-colon punctuation\">::<\/span><span class=\"token function\">error<\/span> <span class=\"token punctuation\">(<\/span><span class=\"token string\">&#034;remove error&#034;<\/span><span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">;<\/span><br \/>\n                <span class=\"token keyword\">return<\/span><span class=\"token punctuation\">;<\/span><br \/>\n            <span class=\"token punctuation\">}<\/span><\/p>\n<p>        <span class=\"token keyword\">uint32_t<\/span> pos <span class=\"token operator\">&#061;<\/span> _timers<span class=\"token punctuation\">[<\/span>id<span class=\"token punctuation\">]<\/span><span class=\"token punctuation\">.<\/span><span class=\"token function\">lock<\/span> <span class=\"token punctuation\">(<\/span><span class=\"token punctuation\">)<\/span><span class=\"token operator\">-&gt;<\/span><span class=\"token function\">GetTimeOut<\/span> <span class=\"token punctuation\">(<\/span><span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">;<\/span><\/p>\n<p>\u3010bug3\u3011 \u3010bug4\u3011<\/p>\n<h3>7. \u603b\u7ed3<\/h3>\n<p>\u7ed3\u6784&#xff1a;\u4efb\u52a1\u72b6\u6001 &#043; \u4e24\u5957\u7d22\u5f15 &#043; \u5916\u90e8\u9a71\u52a8&#xff1b;<\/p>\n<h3>8. \u5e38\u89c1\u95ee\u9898<\/h3>\n<li>lock() \u4e3a\u4f55\u6709\u6548&#xff1f;&#xff08;_wheel \u5f3a\u5f15\u7528\u6301\u6709&#xff09;<\/li>\n<li>SetCancel \u8fd4\u56de false&#xff1f;&#xff08;b &#061;&#061; _cancel \u65f6&#xff09;<\/li>\n<li>_wheel[id] \u80fd\u5b9a\u4f4d\u5417&#xff1f;&#xff08;\u4e0d\u80fd&#xff0c;\u4e0b\u6807\u662f\u5ef6\u8fdf\u8ddd\u79bb&#xff09;<\/li>\n<h3>9. \u6807\u7b7e<\/h3>\n<p>\u65f6\u95f4\u8f6e \/ C&#043;&#043; \/ \u667a\u80fd\u6307\u9488 \/ weak_ptr<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\/* MD \/ \u5bcc\u6587\u672c\u4e2d\u7684 .toc\uff08\u542b\u535a\u5ba2\u56ed\u642c\u5bb6\u7b49\u5d4c\u5957\u7ed3\u6784\uff09\uff1b.toc-box \u5728\u4fa7\u680f\uff0c\u4e0d\u53d7\u5f71\u54cd *\/#content_views .toc,\/* \u7f16\u8f91\u5668\u5e38\u5728\u76ee\u5f55\u524d\u540e\u63d2\u5165\u7a7a p\uff08:empty \u4ecd\u5360 20px\uff09\uff0c\u4e00\u5e76\u53bb\u6389\u907f\u514d\u9876\u7a7a\u9699 *\/#content_views.markdown_views &gt; p:empty:has(+ .toc),#content_views.markdown_views &gt; .toc + p:empty,\/* \u5bcc\u6587\u672c\u65e7\u7248\u76ee\u5f55\u6807\u8bb0 *\/#content<\/p>\n","protected":false},"author":2,"featured_media":115862,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[55,174],"topic":[],"class_list":["post-115863","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-server","tag-c"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v20.3 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>\u4effmuduo\u5b9e\u73b0\u9ad8\u5e76\u53d1\u670d\u52a1\u5668\u2014\u2014\u65f6\u95f4\u8f6etimewheel.cpp - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.wsisp.com\/helps\/115863.html\" \/>\n<meta property=\"og:locale\" content=\"zh_CN\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"\u4effmuduo\u5b9e\u73b0\u9ad8\u5e76\u53d1\u670d\u52a1\u5668\u2014\u2014\u65f6\u95f4\u8f6etimewheel.cpp - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\" \/>\n<meta property=\"og:description\" content=\"\/* MD \/ \u5bcc\u6587\u672c\u4e2d\u7684 .toc\uff08\u542b\u535a\u5ba2\u56ed\u642c\u5bb6\u7b49\u5d4c\u5957\u7ed3\u6784\uff09\uff1b.toc-box \u5728\u4fa7\u680f\uff0c\u4e0d\u53d7\u5f71\u54cd *\/#content_views .toc,\/* \u7f16\u8f91\u5668\u5e38\u5728\u76ee\u5f55\u524d\u540e\u63d2\u5165\u7a7a p\uff08:empty \u4ecd\u5360 20px\uff09\uff0c\u4e00\u5e76\u53bb\u6389\u907f\u514d\u9876\u7a7a\u9699 *\/#content_views.markdown_views &gt; p:empty:has(+ .toc),#content_views.markdown_views &gt; .toc + p:empty,\/* \u5bcc\u6587\u672c\u65e7\u7248\u76ee\u5f55\u6807\u8bb0 *\/#content\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.wsisp.com\/helps\/115863.html\" \/>\n<meta property=\"og:site_name\" content=\"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\" \/>\n<meta property=\"article:published_time\" content=\"2026-10-20T05:41:10+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/10\/20261020054107-6ad6fef3a25a6.png\" \/>\n<meta name=\"author\" content=\"admin\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"\u4f5c\u8005\" \/>\n\t<meta name=\"twitter:data1\" content=\"admin\" \/>\n\t<meta name=\"twitter:label2\" content=\"\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4\" \/>\n\t<meta name=\"twitter:data2\" content=\"3 \u5206\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/115863.html\",\"url\":\"https:\/\/www.wsisp.com\/helps\/115863.html\",\"name\":\"\u4effmuduo\u5b9e\u73b0\u9ad8\u5e76\u53d1\u670d\u52a1\u5668\u2014\u2014\u65f6\u95f4\u8f6etimewheel.cpp - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\",\"isPartOf\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#website\"},\"datePublished\":\"2026-10-20T05:41:10+00:00\",\"dateModified\":\"2026-10-20T05:41:10+00:00\",\"author\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41\"},\"breadcrumb\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/115863.html#breadcrumb\"},\"inLanguage\":\"zh-Hans\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.wsisp.com\/helps\/115863.html\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/115863.html#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\u9996\u9875\",\"item\":\"https:\/\/www.wsisp.com\/helps\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"\u4effmuduo\u5b9e\u73b0\u9ad8\u5e76\u53d1\u670d\u52a1\u5668\u2014\u2014\u65f6\u95f4\u8f6etimewheel.cpp\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#website\",\"url\":\"https:\/\/www.wsisp.com\/helps\/\",\"name\":\"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\",\"description\":\"\u9999\u6e2f\u670d\u52a1\u5668_\u9999\u6e2f\u4e91\u670d\u52a1\u5668\u8d44\u8baf_\u670d\u52a1\u5668\u5e2e\u52a9\u6587\u6863_\u670d\u52a1\u5668\u6559\u7a0b\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.wsisp.com\/helps\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"zh-Hans\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41\",\"name\":\"admin\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"zh-Hans\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery\",\"contentUrl\":\"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery\",\"caption\":\"admin\"},\"sameAs\":[\"http:\/\/wp.wsisp.com\"],\"url\":\"https:\/\/www.wsisp.com\/helps\/author\/admin\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"\u4effmuduo\u5b9e\u73b0\u9ad8\u5e76\u53d1\u670d\u52a1\u5668\u2014\u2014\u65f6\u95f4\u8f6etimewheel.cpp - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.wsisp.com\/helps\/115863.html","og_locale":"zh_CN","og_type":"article","og_title":"\u4effmuduo\u5b9e\u73b0\u9ad8\u5e76\u53d1\u670d\u52a1\u5668\u2014\u2014\u65f6\u95f4\u8f6etimewheel.cpp - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","og_description":"\/* MD \/ \u5bcc\u6587\u672c\u4e2d\u7684 .toc\uff08\u542b\u535a\u5ba2\u56ed\u642c\u5bb6\u7b49\u5d4c\u5957\u7ed3\u6784\uff09\uff1b.toc-box \u5728\u4fa7\u680f\uff0c\u4e0d\u53d7\u5f71\u54cd *\/#content_views .toc,\/* \u7f16\u8f91\u5668\u5e38\u5728\u76ee\u5f55\u524d\u540e\u63d2\u5165\u7a7a p\uff08:empty \u4ecd\u5360 20px\uff09\uff0c\u4e00\u5e76\u53bb\u6389\u907f\u514d\u9876\u7a7a\u9699 *\/#content_views.markdown_views &gt; p:empty:has(+ .toc),#content_views.markdown_views &gt; .toc + p:empty,\/* \u5bcc\u6587\u672c\u65e7\u7248\u76ee\u5f55\u6807\u8bb0 *\/#content","og_url":"https:\/\/www.wsisp.com\/helps\/115863.html","og_site_name":"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","article_published_time":"2026-10-20T05:41:10+00:00","og_image":[{"url":"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/10\/20261020054107-6ad6fef3a25a6.png"}],"author":"admin","twitter_card":"summary_large_image","twitter_misc":{"\u4f5c\u8005":"admin","\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4":"3 \u5206"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.wsisp.com\/helps\/115863.html","url":"https:\/\/www.wsisp.com\/helps\/115863.html","name":"\u4effmuduo\u5b9e\u73b0\u9ad8\u5e76\u53d1\u670d\u52a1\u5668\u2014\u2014\u65f6\u95f4\u8f6etimewheel.cpp - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","isPartOf":{"@id":"https:\/\/www.wsisp.com\/helps\/#website"},"datePublished":"2026-10-20T05:41:10+00:00","dateModified":"2026-10-20T05:41:10+00:00","author":{"@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41"},"breadcrumb":{"@id":"https:\/\/www.wsisp.com\/helps\/115863.html#breadcrumb"},"inLanguage":"zh-Hans","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.wsisp.com\/helps\/115863.html"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.wsisp.com\/helps\/115863.html#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\u9996\u9875","item":"https:\/\/www.wsisp.com\/helps"},{"@type":"ListItem","position":2,"name":"\u4effmuduo\u5b9e\u73b0\u9ad8\u5e76\u53d1\u670d\u52a1\u5668\u2014\u2014\u65f6\u95f4\u8f6etimewheel.cpp"}]},{"@type":"WebSite","@id":"https:\/\/www.wsisp.com\/helps\/#website","url":"https:\/\/www.wsisp.com\/helps\/","name":"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","description":"\u9999\u6e2f\u670d\u52a1\u5668_\u9999\u6e2f\u4e91\u670d\u52a1\u5668\u8d44\u8baf_\u670d\u52a1\u5668\u5e2e\u52a9\u6587\u6863_\u670d\u52a1\u5668\u6559\u7a0b","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.wsisp.com\/helps\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"zh-Hans"},{"@type":"Person","@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41","name":"admin","image":{"@type":"ImageObject","inLanguage":"zh-Hans","@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/image\/","url":"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery","contentUrl":"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery","caption":"admin"},"sameAs":["http:\/\/wp.wsisp.com"],"url":"https:\/\/www.wsisp.com\/helps\/author\/admin"}]}},"_links":{"self":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts\/115863","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/comments?post=115863"}],"version-history":[{"count":0,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts\/115863\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/media\/115862"}],"wp:attachment":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/media?parent=115863"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/categories?post=115863"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/tags?post=115863"},{"taxonomy":"topic","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/topic?post=115863"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}