{"size": 297, "ext": "js", "max_stars_repo_path": "lib/increase-time-to.js", "max_stars_repo_name": "VIDY/ethereum-utils", "max_stars_repo_stars_event_min_datetime": "2020-07-26T18:12:02.000Z", "max_stars_repo_stars_event_max_datetime": "2020-07-26T18:12:02.000Z", "max_issues_repo_path": "lib/increase-time-to.js", "max_issues_repo_name": "VIDY/ethereum-utils", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "lib/increase-time-to.js", "max_forks_repo_name": "VIDY/ethereum-utils", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": 1, "max_issues_count": null, "max_forks_count": null, "avg_line_length": 33.0, "max_line_length": 107, "alphanum_fraction": 0.6801346801}
const increaseTime = require('./increase-time')

module.exports = (target) => {
  let now = web3.eth.getBlock('latest').timestamp;
  if (target < now) throw Error(`Cannot increase current time(${now}) to a moment in the past(${target})`);
  let diff = target - now;
  return increaseTime(diff);
}
