timeout icon indicating copy to clipboard operation
timeout copied to clipboard

add debug interface timeouts_pendings()

Open ygj6 opened this issue 6 years ago • 0 comments

Sometimes I want to check the value of pending field of struct timeouts for debug, then I implement this function.In my other c file, I can use it as this:

void logPendings(struct timeouts *T)
{
    int i;
    uint64_t *pendings;
    int wheel = timeouts_pendings(T, &pendings);
    for (i = 0; i < wheel; ++i) {
        printf("%016llx \n", pendings[i]);
    }
    printf("\n");
    free(pendings);
}

ygj6 avatar May 30 '19 05:05 ygj6