diff options
author | monsta <[email protected]> | 2017-12-24 15:55:43 +0300 |
---|---|---|
committer | monsta <[email protected]> | 2017-12-24 15:55:43 +0300 |
commit | f0e8a4529f08c43a6d7d6fb7501ac7d83342ae2e (patch) | |
tree | aeb3c028ef03b901aaeace1707f4e2d2d5debecb /libslab | |
parent | d68834a740cb3ac396dea12f1d4cb73d309a240e (diff) | |
download | mate-control-center-f0e8a4529f08c43a6d7d6fb7501ac7d83342ae2e.tar.bz2 mate-control-center-f0e8a4529f08c43a6d7d6fb7501ac7d83342ae2e.tar.xz |
libslab: drop useless checkpoint function
Diffstat (limited to 'libslab')
-rw-r--r-- | libslab/bookmark-agent.c | 11 | ||||
-rw-r--r-- | libslab/libslab-utils.c | 37 | ||||
-rw-r--r-- | libslab/libslab-utils.h | 2 |
3 files changed, 0 insertions, 50 deletions
diff --git a/libslab/bookmark-agent.c b/libslab/bookmark-agent.c index a2d0033f..9c2cbb40 100644 --- a/libslab/bookmark-agent.c +++ b/libslab/bookmark-agent.c @@ -361,8 +361,6 @@ bookmark_agent_update_from_bookmark_file (BookmarkAgent *this, GBookmarkFile *st priv = PRIVATE (this); - libslab_checkpoint ("bookmark_agent_update_from_bookmark_file(): start updating"); - items_ordered = make_items_from_bookmark_file (this, store); g_bookmark_file_free (priv->store); @@ -381,10 +379,7 @@ bookmark_agent_update_from_bookmark_file (BookmarkAgent *this, GBookmarkFile *st g_list_free (items_ordered); - libslab_checkpoint ("bookmark_agent_update_from_bookmark_file(): updating internal items"); update_items (this); - - libslab_checkpoint ("bookmark_agent_update_from_bookmark_file(): end updating"); } void @@ -840,9 +835,7 @@ load_xbel_store (BookmarkAgent *this) if (!priv->store_path) success = FALSE; else { - libslab_checkpoint ("load_xbel_store(): start loading %s", priv->store_path); success = g_bookmark_file_load_from_file (priv->store, priv->store_path, & error); - libslab_checkpoint ("load_xbel_store(): end loading %s", priv->store_path); } if (!success) { @@ -856,16 +849,12 @@ load_xbel_store (BookmarkAgent *this) return; } - libslab_checkpoint ("load_xbel_store(): start creating items from %s", priv->store_path); - uris = g_bookmark_file_get_uris (priv->store, NULL); for (i = 0; uris && uris [i]; ++i) priv->create_item (this, uris [i]); g_strfreev (uris); - - libslab_checkpoint ("load_xbel_store(): end creating items from %s", priv->store_path); } static void diff --git a/libslab/libslab-utils.c b/libslab/libslab-utils.c index 5cb74b3f..fc380719 100644 --- a/libslab/libslab-utils.c +++ b/libslab/libslab-utils.c @@ -13,8 +13,6 @@ #include <sys/time.h> #include <gtk/gtk.h> -static FILE *checkpoint_file; - MateDesktopItem * libslab_mate_desktop_item_new_from_unknown_id (const gchar *id) { @@ -145,38 +143,3 @@ libslab_handle_g_error (GError **error, const gchar *msg_format, ...) g_free (msg); } - -void -libslab_checkpoint (const char *format, ...) -{ - va_list args; - struct timeval tv; - struct tm tm; - struct rusage rusage; - - if (!checkpoint_file) - return; - - gettimeofday (&tv, NULL); - tm = *localtime (&tv.tv_sec); - - getrusage (RUSAGE_SELF, &rusage); - - fprintf (checkpoint_file, - "%02d:%02d:%02d.%04d (user:%d.%04d, sys:%d.%04d) - ", - (int) tm.tm_hour, - (int) tm.tm_min, - (int) tm.tm_sec, - (int) (tv.tv_usec / 100), - (int) rusage.ru_utime.tv_sec, - (int) (rusage.ru_utime.tv_usec / 100), - (int) rusage.ru_stime.tv_sec, - (int) (rusage.ru_stime.tv_usec / 100)); - - va_start (args, format); - vfprintf (checkpoint_file, format, args); - va_end (args); - - fputs ("\n", checkpoint_file); - fflush (checkpoint_file); -} diff --git a/libslab/libslab-utils.h b/libslab/libslab-utils.h index 8871ef77..ce2138ec 100644 --- a/libslab/libslab-utils.h +++ b/libslab/libslab-utils.h @@ -16,8 +16,6 @@ void libslab_handle_g_error (GError **error, const gchar *msg_forma GdkScreen *libslab_get_current_screen (void); -void libslab_checkpoint (const char *format, ...); - #ifdef __cplusplus } #endif |