📜  获取日志 api 响应时间 - Javascript 代码示例

📅  最后修改于: 2022-03-11 15:01:20.761000             🧑  作者: Mango

代码示例1
console.time("timer1");
      fetch('https://jsonplaceholder.typicode.com/posts/1')
  .then((res) => {
    return res.json();
  })
.then((data) => {
  console.timeEnd("timer1");