<commit_before>#ifndef TIME_H
#define TIME_H


#include "stdint.h"
#include "stddef.h"

#define time_t long
#define sizeof_time_t sizeof_long

/* gettime sets the amount time (in tv_sec seconds and tv_nsec
 * nanoseconds) since an unspecified point in the past (for example,
 * system start-up time, or the Epoch) on the VPC a task running on.
 *
 * Note: different VPCs possibly have different start point.
 */
long gettime(time_t &tv_sec, long &tv_nsec)
{
    long ret;

    // set system call id
    *(long*) SYSCALL_ID_ADDR = (long) SYSCALL_ID_GETTIME;

    // set system call input arguments: none here

    // call soft interrupt of system call
    asm("int 0x80");

    // get output value of system call
    ret = *(long*) (SYSCALL_COMM_AREA_ADDR);
    tv_sec = *(time_t*) (SYSCALL_COMM_AREA_ADDR + sizeof_long);
    tv_nsec *(long*) (SYSCALL_COMM_AREA_ADDR + sizeof_long + sizeof_time_t);

    return ret;
}

#endif // TIME_H<commit_msg>bugfix in time.h: use excplicit time converting<commit_after>#ifndef TIME_H
#define TIME_H


#include "stdint.h"
#include "stddef.h"

#define time_t long
#define sizeof_time_t sizeof_long

/* gettime sets the amount time (in tv_sec seconds and tv_nsec
 * nanoseconds) since an unspecified point in the past (for example,
 * system start-up time, or the Epoch) on the VPC a task running on.
 *
 * Note: different VPCs possibly have different start point.
 */
long gettime(time_t *tv_sec, long *tv_nsec)
{
    long ret;

    // set system call id
    *(long*) SYSCALL_ID_ADDR = (long) SYSCALL_ID_GETTIME;

    // set system call input arguments: none here

    // call soft interrupt of system call
    asm("int 0x80");

    // get output value of system call
    ret = *(long*) ((long)SYSCALL_COMM_AREA_ADDR);
    *tv_sec = *(time_t*) ((long)SYSCALL_COMM_AREA_ADDR + sizeof_long);
    *tv_nsec = *(long*) ((long)SYSCALL_COMM_AREA_ADDR + sizeof_long + sizeof_time_t);

    return ret;
}
 
#endif // TIME_H
{'fraction_non_alphanumeric': 0.10107747562852745, 'fraction_numerical': 0.0030785017957927143, 'mean_word_length': 3.733009708737864, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4956939', 'n_tokens_mistral': 693, 'n_tokens_neox': 664, 'n_words': 219}