lib: add a function to indicate activity

Signed-off-by: Thomas Wood <thomas.wood@intel.com>
This commit is contained in:
Thomas Wood
2014-09-30 17:05:39 +01:00
parent c2d5519906
commit 6a8d33c2bb
5 changed files with 21 additions and 4 deletions
+15
View File
@@ -246,6 +246,21 @@ void igt_progress(const char *header, uint64_t i, uint64_t total)
(long long unsigned)i * 100 / total);
}
/**
* igt_print_activity:
*
* Print a '.' to indicate activity. This is printed without a newline and
* only if output is to a terminal.
*/
void igt_print_activity(void)
{
if (!isatty(STDOUT_FILENO))
return;
igt_info(".");
fflush(stdout);
}
/* mappable aperture trasher helper */
drm_intel_bo **trash_bos;
int num_trash_bos;
+1
View File
@@ -41,6 +41,7 @@ void igt_permute_array(void *array, unsigned size,
unsigned i,
unsigned j));
void igt_progress(const char *header, uint64_t i, uint64_t total);
void igt_print_activity(void);
bool igt_check_boolean_env_var(const char *env_var, bool default_value);
bool igt_aub_dump_enabled(void);