diff options
author | Joe Zhao <ztuowen@gmail.com> | 2015-09-04 08:46:14 -0600 |
---|---|---|
committer | Joe Zhao <ztuowen@gmail.com> | 2015-09-04 08:46:14 -0600 |
commit | 1c8adbdeaf48fd9a2d7aa827a5bc761ed21b4796 (patch) | |
tree | bb6b7d0dcf6c609a564fee3c5605b84f3de80cba | |
parent | 8786ca9366a76c6695a6cb4cb2bcfb32e913d950 (diff) | |
download | pomodori-1c8adbdeaf48fd9a2d7aa827a5bc761ed21b4796.tar.gz pomodori-1c8adbdeaf48fd9a2d7aa827a5bc761ed21b4796.tar.bz2 pomodori-1c8adbdeaf48fd9a2d7aa827a5bc761ed21b4796.zip |
added time
-rw-r--r-- | logging.cpp | 4 | ||||
-rw-r--r-- | totimer.cpp | 1 |
2 files changed, 3 insertions, 2 deletions
diff --git a/logging.cpp b/logging.cpp index d426978..3d1fb14 100644 --- a/logging.cpp +++ b/logging.cpp @@ -6,6 +6,7 @@ #include "stdlib.h" #include<iostream> #include <fstream> +#include <ctime> using namespace std; void log(tres* res,int code) @@ -14,7 +15,8 @@ void log(tres* res,int code) { ofstream fot; fot.open("~/.pomodori"); - fot<<1<<endl; + time_t now = time(0); + fot<<ctime(&now)<<endl; } exit(0); }
\ No newline at end of file diff --git a/totimer.cpp b/totimer.cpp index 8bdbfe2..b632ebf 100644 --- a/totimer.cpp +++ b/totimer.cpp @@ -4,7 +4,6 @@ #include "totimer.h" #include<stdlib.h> -#include<stdio.h> void quit(NotifyNotification *note,gpointer user_data) { |