[JavaScript] Einfacher Timer

<!doctype html>
<html lang="de">
  <head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Timer demo</title>
  </head>
  <body>
    <script>
      'use strict';  
      (function () {
        function timer() {
          let st = Date.now();
          // Intervall 100ms
          setInterval(function() {
            let el = Date.now() - st;
            console.log((el / 1000).toFixed(1));
          }, 100);
        }

        document.addEventListener('DOMContentLoaded', timer);
      }());
    </script>
  </body>
</html>