Author: adrian.chadd
Date: Fri Jul  3 23:22:10 2009
New Revision: 14109

Modified:
    branches/LUSCA_HEAD/tools/ufs_log_build.c

Log:
Add in calls to getCurrentTime() to update the timestamp.

This allows the debugging output to have actual timestamps attached.

This ends up adding one gettimeofday() syscall per directory and per file
but in the grand scheme of things it should add very minimal overhead.



Modified: branches/LUSCA_HEAD/tools/ufs_log_build.c
==============================================================================
--- branches/LUSCA_HEAD/tools/ufs_log_build.c   (original)
+++ branches/LUSCA_HEAD/tools/ufs_log_build.c   Fri Jul  3 23:22:10 2009
@@ -200,9 +200,11 @@
        int fn;
        int i, j;

+       getCurrentTime();
        for (i = 0; i < store_ufs_l1(sd); i++) {
                for (j = 0; j < store_ufs_l2(sd); j++) {
                        (void) store_ufs_createDir(sd, i, j, dir);
+                       getCurrentTime();
                        debug(47, 1) ("read_dir: opening dir %s\n", dir);
                        d = opendir(dir);
                        if (! d) {
@@ -213,6 +215,7 @@
                        while ( (de = readdir(d)) != NULL) {
                                if (de->d_name[0] == '.')
                                        continue;
+                               getCurrentTime();

                                /* Verify that the given filename belongs in 
the given directory */
                                if (sscanf(de->d_name, "%x", &fn) != 1) {

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"lusca-commit" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/lusca-commit?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to