aboutsummaryrefslogtreecommitdiff
path: root/src/helper.py
diff options
context:
space:
mode:
authorCharles Cabergs <me@cacharle.xyz>2020-10-01 11:49:53 +0200
committerCharles Cabergs <me@cacharle.xyz>2020-10-01 11:49:53 +0200
commit1f18e740539aed751865ecff9d0f3cba44230e54 (patch)
treee23254751cc5a3be551233efb979a00571f40dc6 /src/helper.py
parent763f02a8b1e69c0e26a088824981d23ba1e5386d (diff)
downloadphilosophers_test-1f18e740539aed751865ecff9d0f3cba44230e54.tar.gz
philosophers_test-1f18e740539aed751865ecff9d0f3cba44230e54.tar.bz2
philosophers_test-1f18e740539aed751865ecff9d0f3cba44230e54.zip
Refactoring file structure, Added summary
Diffstat (limited to 'src/helper.py')
-rw-r--r--src/helper.py17
1 files changed, 15 insertions, 2 deletions
diff --git a/src/helper.py b/src/helper.py
index 56014d6..bc211c9 100644
--- a/src/helper.py
+++ b/src/helper.py
@@ -6,12 +6,25 @@
# By: cacharle <me@cacharle.xyz> +#+ +:+ +#+ #
# +#+#+#+#+#+ +#+ #
# Created: 2020/09/29 11:19:32 by cacharle #+# #+# #
-# Updated: 2020/09/29 11:19:50 by cacharle ### ########.fr #
+# Updated: 2020/10/01 11:27:48 by cacharle ### ########.fr #
# #
# ############################################################################ #
import time
-
def current_ms():
return int(time.time() * 1000)
+
+RED_CHARS = "\033[31m"
+GREEN_CHARS = "\033[32m"
+BLUE_CHARS = "\033[34m"
+CLOSE_CHARS = "\033[0m"
+
+def red(string):
+ return RED_CHARS + string + CLOSE_CHARS
+
+def green(string):
+ return GREEN_CHARS + string + CLOSE_CHARS
+
+def blue(string):
+ return BLUE_CHARS + string + CLOSE_CHARS