Skip to content
This repository has been archived by the owner on Apr 20, 2022. It is now read-only.

Commit

Permalink
update project
Browse files Browse the repository at this point in the history
  • Loading branch information
wolfram77 committed Sep 22, 2018
1 parent 80de4a2 commit 76605cb
Show file tree
Hide file tree
Showing 8 changed files with 35 additions and 36 deletions.
6 changes: 3 additions & 3 deletions src/App.config → App.config
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8" ?>
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5.2" />
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5"/>
</startup>
</configuration>
</configuration>
11 changes: 7 additions & 4 deletions src/src.csproj → App.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,12 @@
<ProjectGuid>{E2A55660-FDF0-494A-A0E7-1026CC50202E}</ProjectGuid>
<OutputType>Exe</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>orez.osleep</RootNamespace>
<AssemblyName>osleep</AssemblyName>
<TargetFrameworkVersion>v4.5.2</TargetFrameworkVersion>
<RootNamespace>App</RootNamespace>
<AssemblyName>esleep</AssemblyName>
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
<TargetFrameworkProfile />
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>
Expand Down Expand Up @@ -43,12 +44,14 @@
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
<Compile Include="oParams.cs" />
<Compile Include="Params.cs" />
<Compile Include="Program.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
</ItemGroup>
<ItemGroup>
<None Include="App.config" />
<None Include="LICENSE" />
<None Include="README.md" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Expand Down
15 changes: 6 additions & 9 deletions cmd-sleep.sln → App.sln
Original file line number Diff line number Diff line change
@@ -1,15 +1,9 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 14
VisualStudioVersion = 14.0.24720.0
# Visual Studio 15
VisualStudioVersion = 15.0.28010.2036
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "src", "src\src.csproj", "{E2A55660-FDF0-494A-A0E7-1026CC50202E}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "0", "0", "{73C78870-0EDD-431C-AEC1-23B6D7602354}"
ProjectSection(SolutionItems) = preProject
LICENSE = LICENSE
README.md = README.md
EndProjectSection
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "App", "App.csproj", "{E2A55660-FDF0-494A-A0E7-1026CC50202E}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Expand All @@ -25,4 +19,7 @@ Global
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {637F2763-9D71-4A76-B6D2-39CF785E227A}
EndGlobalSection
EndGlobal
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright (c) 2016 0rez
Copyright (c) 2016 Merferry

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
6 changes: 3 additions & 3 deletions src/oParams.cs → Params.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
namespace orez.osleep {
class oParams {
namespace App {
class Params {

// data
/// <summary>
Expand Down Expand Up @@ -29,7 +29,7 @@ class oParams {
/// Get parameters from input arguments.
/// </summary>
/// <param name="args">Input arguments.</param>
public oParams(string[] args) {
public Params(string[] args) {
double ms = 0;
for (int i = 0; i < args.Length; i++) {
switch (args[i]) {
Expand Down
4 changes: 2 additions & 2 deletions src/Program.cs → Program.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
using System;
using System.Threading;

namespace orez.osleep {
namespace App {
class Program {

// static method
Expand All @@ -11,7 +11,7 @@ class Program {
/// </summary>
/// <param name="args">Input arguments.</param>
static void Main(string[] args) {
oParams p = new oParams(args);
Params p = new Params(args);
TimeSpan t = new TimeSpan(p.Days, p.Hours, p.Minutes, p.Seconds, p.Milliseconds);
Thread.Sleep(t);
}
Expand Down
12 changes: 6 additions & 6 deletions src/Properties/AssemblyInfo.cs → Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@
// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyTitle("osleep")]
[assembly: AssemblyTitle("extra-sleep")]
[assembly: AssemblyDescription("Sleep for specified time in Windows Console")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("0rez")]
[assembly: AssemblyProduct("osleep")]
[assembly: AssemblyCopyright("Copyright © 2016")]
[assembly: AssemblyCompany("Merferry")]
[assembly: AssemblyProduct("extra-sleep")]
[assembly: AssemblyCopyright("Copyright (c) 2016 Merferry")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]

Expand All @@ -32,5 +32,5 @@
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("0.0.0.7")]
[assembly: AssemblyFileVersion("0.0.0.7")]
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]
15 changes: 7 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
# osleep

Sleep for specified time in Windows Console.
> 1. Download [exe file](https://raw.githubusercontent.com/winp/extra-bel/master/ecd.cmd).
> 2. Copy to `C:\Program_Files\Scripts`.
> 3. Add `C:\Program_Files\Scripts` to `PATH` environment variable.

## usage

```batch
> osleep [options] [<milliseconds>]
> esleep [options] [<milliseconds>]
:: [-d|--days <days>]
:: [-h|--hours <hours>]
:: [-m|--minutes <minutes>]
Expand All @@ -18,11 +17,11 @@ Sleep for specified time in Windows Console.

```batch
:: sleep for 250 milliseconds
> osleep 250
> esleep 250
:: sleep for 8 seconds
> osleep 8000
> esleep 8000
:: sleep for 2 days 8 hours
> osleep -d 2 -h 8
> esleep -d 2 -h 8
```

0 comments on commit 76605cb

Please sign in to comment.