Changeset 79edc36 in mainline for uspace/app/top/screen.c


Ignore:
Timestamp:
2010-04-01T15:21:03Z (15 years ago)
Author:
Stanislav Kozina <stanislav.kozina@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
62550dce
Parents:
83a957a
Message:

System load echo fix, now it looks realistic
top echoes first values (uptime)
Several ps and uptime fixes

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/app/top/screen.c

    r83a957a r79edc36  
    3838#include <io/console.h>
    3939#include <vfs/vfs.h>
    40 #include <futex.h>
    4140#include "screen.h"
    42 
    43 futex_t screen_lock;
     41#include "top.h"
    4442
    4543static void resume_normal(void)
     
    6866}
    6967
     68static inline void print_time(data_t *data)
     69{
     70        printf("%02d:%02d:%02d ", data->hours, data->minutes, data->seconds);
     71}
     72
     73static inline void print_uptime(data_t *data)
     74{
     75        printf("up %4d days, %02d:%02d:%02d ", data->uptime_d, data->uptime_h,
     76                data->uptime_m, data->uptime_s);
     77}
     78
     79static int i = 0;
     80void print_data(data_t *data)
     81{
     82        clear_screen();
     83        fflush(stdout);
     84        printf("top - ");
     85        print_time(data);
     86        print_uptime(data);
     87        puts(" ... \n");
     88        printf("A dalsi radek topu - jiz po %dte", ++i);
     89        fflush(stdout);
     90}
     91
    7092/** @}
    7193 */
Note: See TracChangeset for help on using the changeset viewer.