e-yari/tik-tok

Simple and lightweight tik() / tok() timer for Laravel

Maintainers

Package info

github.com/yari-eliyas/Tik-Tok

pkg:composer/e-yari/tik-tok

Transparency log

Statistics

Installs: 3

Dependents: 0

Suggesters: 0

Stars: 0

Open Issues: 0

v1.0.2 2026-07-01 11:37 UTC

This package is auto-updated.

Last update: 2026-07-01 18:09:27 UTC


README

Laravel PHP

یک پکیج ساده، سبک و کاربردی برای اندازه‌گیری زمان اجرای کد در Laravel.

با استفاده از دو تابع ساده tik() و tok() می‌توانید زمان اجرای هر بخشی از کدتان (Controller, Model, Service, Job, Middleware و ...) را به راحتی اندازه‌گیری کنید.

ویژگی‌ها

  • بسیار سبک و بدون dependency اضافی
  • استفاده از hrtime() برای دقت بالا
  • پشتیبانی از چندین تایمر همزمان با نام دلخواه
  • نمایش خودکار زمان در محیط Local / Debug
  • ثبت در Log در محیط Production
  • نصب و راه‌اندازی بسیار آسان
  • قابل استفاده در همه جای Laravel

English

TikTok Timer is a simple, lightweight package that helps you measure the execution time of your code in Laravel applications.

Just use tik() to start and tok() to stop and see how long a piece of code takes.

Features

  • ⚡ Very lightweight (no dependencies)
  • 🎯 High precision using hrtime()
  • 🔖 Support for multiple named timers
  • 🖥️ Beautiful output in local/debug mode
  • 📝 Auto logging in production
  • 🌐 Works everywhere (Controllers, Models, Services, Jobs, Middleware, etc.)

Requirements

  • PHP: ^8.2
  • Laravel: ^10.0 | ^11.0 | ^12.0

Sample

tik();

your code

tok();

Installation

composer require e-yari/tik-tok