{"size": 783, "ext": "js", "max_stars_repo_path": "testing/make_high_data.js", "max_stars_repo_name": "aobcgm/cgm-remote-monitor-1", "max_stars_repo_stars_event_min_datetime": "2020-06-25T07:34:17.000Z", "max_stars_repo_stars_event_max_datetime": "2021-07-19T00:26:20.000Z", "max_issues_repo_path": "testing/make_high_data.js", "max_issues_repo_name": "rqueen/cgm-remote-monitor", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "testing/make_high_data.js", "max_forks_repo_name": "rqueen/cgm-remote-monitor", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": 2, "max_issues_count": null, "max_forks_count": null, "avg_line_length": 30.1153846154, "max_line_length": 89, "alphanum_fraction": 0.6270753512}
var fs = require('fs');

var data = ""
var END_TIME = Date.now();
var FIVE_MINS_IN_MS = 300000;
var TIME_PERIOD_HRS = 24;
var DATA_PER_HR = 12;
var START_BG = 50;
var currentBG = START_BG;
var currentTime = END_TIME - (TIME_PERIOD_HRS * DATA_PER_HR * FIVE_MINS_IN_MS);

for(var i = 0; i < TIME_PERIOD_HRS * DATA_PER_HR; i++) {
    currentBG += Math.ceil(Math.cos(i)*5+.2);
    currentTime += FIVE_MINS_IN_MS;
    data += "1," + currentBG + ",,,,,,,,," + new Date(currentTime).toString() + ",,,,\n";
}
fs.writeFile("../Dexcom.csv", data);

function makedata() {
    currentBG -= 1;
    currentTime += FIVE_MINS_IN_MS;
    data += "1," + currentBG + ",,,,,,,,," + new Date(currentTime).toString() + ",,,,\n";
    fs.writeFile("../Dexcom.csv", data);
}

setInterval(makedata, 1000 * 10)