Skip to content

Add stop_timer usage example#764

Open
RUNQILIU-123 wants to merge 1 commit into
thoth-tech:mainfrom
RUNQILIU-123:stop-timer-clean
Open

Add stop_timer usage example#764
RUNQILIU-123 wants to merge 1 commit into
thoth-tech:mainfrom
RUNQILIU-123:stop-timer-clean

Conversation

@RUNQILIU-123
Copy link
Copy Markdown

Summary

This pull request adds an initial usage example for stop_timer in the timers category.

Files added

  • stop_timer-1-example.cpp
  • stop_timer-1-example.py
  • stop_timer-1-example-top-level.cs
  • stop_timer-1-example-oop.cs
  • stop_timer-1-example.txt
  • stop_timer-1-example.gif

What the example does

This example opens a window, starts a timer, and allows the user to press S to stop the timer and reset its ticks to 0.

Testing

Tested by running:

  • C++ version
  • Python version
  • C# OOP version
  • C# TOP-LEVEL version

Verified that:

  • the window opens correctly
  • the timer starts running normally
  • pressing S stops the timer
  • the displayed status and ticks update correctly

Notes

This is an interactive usage example for the stop_timer function in the timers category.

@netlify
Copy link
Copy Markdown

netlify Bot commented May 8, 2026

Deploy Preview for splashkit ready!

Name Link
🔨 Latest commit 6358d41
🔍 Latest deploy log https://app.netlify.com/projects/splashkit/deploys/69fdc6c9ee797800083d106e
😎 Deploy Preview https://deploy-preview-764--splashkit.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

Copy link
Copy Markdown

@himanshigaba22 himanshigaba22 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good example and the deploy preview is passing cleanly! A couple of things to fix up though - the .txt file has 2 lines when it should be title only, and the C++, C#, and Python versions are using ternary operators for the status string, so those should be swapped out for simple if/else statements.

Also worth double-checking the description says stopping a timer “resets ticks to 0” — that sounds more like reset_timer, not stop_timer, so it could mislead users. Finally, can you confirm whether usage-example-references.json has been updated or if this is handled by the dynamic scanner?

Once those are sorted, it should be good to go!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants