This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/freetype/__init__.py b/freetype/__init__.py | |
index e175d52..e602d9c 100644 | |
--- a/freetype/__init__.py | |
+++ b/freetype/__init__.py | |
@@ -30,15 +30,24 @@ import ctypes.util | |
__dll__ = None | |
__handle__ = None | |
FT_Library_filename = ctypes.util.find_library('freetype') | |
+ | |
if not FT_Library_filename: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public static TimeSpan GetUptime() | |
{ | |
ManagementObject mo = new ManagementObject(@"\\.\root\cimv2:Win32_OperatingSystem=@"); | |
DateTime lastBootUp = ManagementDateTimeConverter.ToDateTime(mo["LastBootUpTime"].ToString()); | |
return DateTime.Now.ToUniversalTime() - lastBootUp.ToUniversalTime(); | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/// <summary> | |
/// This class is used for replacing parts of a string with other content. | |
/// </summary> | |
public static class StringExtensions | |
{ | |
public static string ReplaceFormat(this string str, string format, string replacement) | |
{ | |
return ReplaceFormat(str, format, match => replacement); | |
} |