{"id":73,"date":"2020-06-13T09:42:52","date_gmt":"2020-06-13T09:42:52","guid":{"rendered":"https:\/\/michaeljohnsteiner.com\/?p=73"},"modified":"2020-06-13T09:42:52","modified_gmt":"2020-06-13T09:42:52","slug":"cputotalpc-cs","status":"publish","type":"post","link":"https:\/\/michaeljohnsteiner.com\/index.php\/2020\/06\/13\/cputotalpc-cs\/","title":{"rendered":"CpuTotalPc.cs"},"content":{"rendered":"\n<p>Cpu Load<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"csharp\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">using System.Diagnostics;\npublic static class CpuTotalPc\n{\n    private static PerformanceCounter _CPUsage;\n    public static double CPULoad\n    {\n        get\n        {\n            if (_CPUsage == null)\n                try\n                {\n                    _CPUsage = new PerformanceCounter(\"Processor\", \"% Processor Time\", \"_Total\");\n                }\n                catch\n                {\n                    return 0;\n                }\n            return _CPUsage.NextValue();\n        }\n    }\n}<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>Cpu Load<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[2],"tags":[15,16,17,18],"_links":{"self":[{"href":"https:\/\/michaeljohnsteiner.com\/index.php\/wp-json\/wp\/v2\/posts\/73"}],"collection":[{"href":"https:\/\/michaeljohnsteiner.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/michaeljohnsteiner.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/michaeljohnsteiner.com\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/michaeljohnsteiner.com\/index.php\/wp-json\/wp\/v2\/comments?post=73"}],"version-history":[{"count":1,"href":"https:\/\/michaeljohnsteiner.com\/index.php\/wp-json\/wp\/v2\/posts\/73\/revisions"}],"predecessor-version":[{"id":74,"href":"https:\/\/michaeljohnsteiner.com\/index.php\/wp-json\/wp\/v2\/posts\/73\/revisions\/74"}],"wp:attachment":[{"href":"https:\/\/michaeljohnsteiner.com\/index.php\/wp-json\/wp\/v2\/media?parent=73"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/michaeljohnsteiner.com\/index.php\/wp-json\/wp\/v2\/categories?post=73"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/michaeljohnsteiner.com\/index.php\/wp-json\/wp\/v2\/tags?post=73"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}