File: progress.pxd

package info (click to toggle)
obitools 3.0.1~b26%2Bdfsg-5
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 26,788 kB
  • sloc: ansic: 24,299; python: 657; sh: 27; makefile: 20
file content (65 lines) | stat: -rwxr-xr-x 1,375 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
#cython: language_level=3

cdef extern from "stdio.h":
    struct FILE
    int fprintf(FILE *stream, char *format, ...)
    int fputs(char *string, FILE *stream)
    FILE* stderr
    ctypedef unsigned int off_t "unsigned long long"
    
cdef extern from "unistd.h":
    int fsync(int fd);

cdef extern from "sys/time.h":
    struct tm :
        int tm_yday 
        int tm_hour
        int tm_min
        int tm_sec

    enum: CLOCKS_PER_SEC
    
    ctypedef int time_t
    ctypedef int clock_t
    ctypedef int suseconds_t
    
    struct timeval:
        time_t      tv_sec     #  seconds */
        suseconds_t tv_usec    #  microseconds */


    struct timezone :
        int tz_minuteswest;    # minutes west of Greenwich
        int tz_dsttime;        # type of DST correction 

        
    int gettimeofday(timeval *tv, timezone *tz)


    tm *gmtime_r(time_t *clock, tm *result)
    time_t time(time_t *tloc)
    clock_t clock()

cdef class ProgressBar:
    cdef off_t   maxi
    cdef clock_t starttime
    cdef clock_t lasttime
    cdef clock_t tickcount
    cdef int freq
    cdef int cycle
    cdef int arrow
    cdef int lastlog
    cdef bint ontty
    cdef int fd
    cdef bint cut
    
    cdef bytes _head
    cdef char *chead
    
    cdef object logger

    cdef char  *wheel
    cdef char  *spaces
    cdef char*  diese 
    
    cdef clock_t clock(self)