Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
I
Informatik 2
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Wadi.T
Informatik 2
Commits
2868047c
Commit
2868047c
authored
2 years ago
by
T.Wadi
Browse files
Options
Downloads
Patches
Plain Diff
Delay function implimented
parent
3b0f7065
No related branches found
No related tags found
No related merge requests found
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
main.c
+3
-1
3 additions, 1 deletion
main.c
test.exe
+0
-0
0 additions, 0 deletions
test.exe
tools.c
+14
-1
14 additions, 1 deletion
tools.c
tools.h
+1
-0
1 addition, 0 deletions
tools.h
with
18 additions
and
2 deletions
main.c
+
3
−
1
View file @
2868047c
...
...
@@ -6,7 +6,9 @@
int
main
()
{
PrintLogo
PrintLogo
();
delay
(
2
);
clearScreen
();
return
0
;
}
This diff is collapsed.
Click to expand it.
test.exe
0 → 100644
+
0
−
0
View file @
2868047c
File added
This diff is collapsed.
Click to expand it.
tools.c
+
14
−
1
View file @
2868047c
#include
<stdio.h>
#include
<stdlib.h>
#include
<time.h>
#include
"tools.h"
/**********************************************************/
...
...
@@ -66,4 +67,16 @@ void PrintLogo ()
}
/**********************************************************/
/**********************************************************/
\ No newline at end of file
/**********************************************************/
void
delay
(
unsigned
int
number_of_seconds
)
{
// Converting time into milli_seconds
int
milli_seconds
=
1000
*
number_of_seconds
;
// Storing start time
clock_t
start_time
=
clock
();
// looping till required time is not achieved
while
(
clock
()
<
start_time
+
milli_seconds
)
;
}
\ No newline at end of file
This diff is collapsed.
Click to expand it.
tools.h
+
1
−
0
View file @
2868047c
...
...
@@ -5,5 +5,6 @@ void clearBuffer();
void
waitForEnter
();
int
askYesOrNo
(
char
*
);
void
PrintLogo
();
void
delay
(
unsigned
int
number_of_seconds
);
#endif // TOOLS_H_INCLUDED
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment