First in 202205060145
This commit is contained in:
@@ -0,0 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<configuration>
|
||||
<startup>
|
||||
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.7.2" />
|
||||
</startup>
|
||||
</configuration>
|
||||
@@ -0,0 +1,41 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Threading;
|
||||
using System.Diagnostics;
|
||||
|
||||
namespace Threding_Demo2
|
||||
{
|
||||
class Program
|
||||
{
|
||||
static void Main(string[] args)
|
||||
{
|
||||
long frequency = Stopwatch.Frequency;
|
||||
Console.WriteLine("Timer frequency in ticks per second = {0}",frequency);
|
||||
long nanosecPerTick = (1000L * 1000L * 1000L) / frequency;
|
||||
Console.WriteLine("Timer is accurate within {0} nanoseconds",nanosecPerTick);
|
||||
}
|
||||
}
|
||||
class demo
|
||||
{
|
||||
public Stopwatch Stopwatcher { get; set; }
|
||||
public demo()
|
||||
{
|
||||
this.Stopwatcher = new Stopwatch();
|
||||
}
|
||||
public void PreSpin(Stopwatch a, double duration)
|
||||
{
|
||||
var current = a.ElapsedTicks;
|
||||
while ((a.ElapsedTicks-current)<duration )
|
||||
{
|
||||
Thread.SpinWait(10);
|
||||
}
|
||||
}
|
||||
public void Spin(Stopwatch a, double duration)
|
||||
{
|
||||
this.PreSpin(a,duration);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,36 @@
|
||||
using System.Reflection;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
// 有关程序集的一般信息由以下
|
||||
// 控制。更改这些特性值可修改
|
||||
// 与程序集关联的信息。
|
||||
[assembly: AssemblyTitle("Threding Demo2")]
|
||||
[assembly: AssemblyDescription("")]
|
||||
[assembly: AssemblyConfiguration("")]
|
||||
[assembly: AssemblyCompany("")]
|
||||
[assembly: AssemblyProduct("Threding Demo2")]
|
||||
[assembly: AssemblyCopyright("Copyright © 2021")]
|
||||
[assembly: AssemblyTrademark("")]
|
||||
[assembly: AssemblyCulture("")]
|
||||
|
||||
// 将 ComVisible 设置为 false 会使此程序集中的类型
|
||||
//对 COM 组件不可见。如果需要从 COM 访问此程序集中的类型
|
||||
//请将此类型的 ComVisible 特性设置为 true。
|
||||
[assembly: ComVisible(false)]
|
||||
|
||||
// 如果此项目向 COM 公开,则下列 GUID 用于类型库的 ID
|
||||
[assembly: Guid("bcdd3037-9193-4881-ac65-e02bed9704d0")]
|
||||
|
||||
// 程序集的版本信息由下列四个值组成:
|
||||
//
|
||||
// 主版本
|
||||
// 次版本
|
||||
// 生成号
|
||||
// 修订号
|
||||
//
|
||||
//可以指定所有这些值,也可以使用“生成号”和“修订号”的默认值
|
||||
//通过使用 "*",如下所示:
|
||||
// [assembly: AssemblyVersion("1.0.*")]
|
||||
[assembly: AssemblyVersion("1.0.0.0")]
|
||||
[assembly: AssemblyFileVersion("1.0.0.0")]
|
||||
@@ -0,0 +1,53 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
|
||||
<PropertyGroup>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||
<ProjectGuid>{BCDD3037-9193-4881-AC65-E02BED9704D0}</ProjectGuid>
|
||||
<OutputType>Exe</OutputType>
|
||||
<RootNamespace>Threding_Demo2</RootNamespace>
|
||||
<AssemblyName>Threding Demo2</AssemblyName>
|
||||
<TargetFrameworkVersion>v4.7.2</TargetFrameworkVersion>
|
||||
<FileAlignment>512</FileAlignment>
|
||||
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
|
||||
<Deterministic>true</Deterministic>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||
<PlatformTarget>AnyCPU</PlatformTarget>
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<DebugType>full</DebugType>
|
||||
<Optimize>false</Optimize>
|
||||
<OutputPath>bin\Debug\</OutputPath>
|
||||
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||
<PlatformTarget>AnyCPU</PlatformTarget>
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<Optimize>true</Optimize>
|
||||
<OutputPath>bin\Release\</OutputPath>
|
||||
<DefineConstants>TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.Core" />
|
||||
<Reference Include="System.Xml.Linq" />
|
||||
<Reference Include="System.Data.DataSetExtensions" />
|
||||
<Reference Include="Microsoft.CSharp" />
|
||||
<Reference Include="System.Data" />
|
||||
<Reference Include="System.Net.Http" />
|
||||
<Reference Include="System.Xml" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="Program.cs" />
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="App.config" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||
</Project>
|
||||
Binary file not shown.
@@ -0,0 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<configuration>
|
||||
<startup>
|
||||
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.7.2" />
|
||||
</startup>
|
||||
</configuration>
|
||||
Binary file not shown.
@@ -0,0 +1,4 @@
|
||||
// <autogenerated />
|
||||
using System;
|
||||
using System.Reflection;
|
||||
[assembly: global::System.Runtime.Versioning.TargetFrameworkAttribute(".NETFramework,Version=v4.7.2", FrameworkDisplayName = ".NET Framework 4.7.2")]
|
||||
Binary file not shown.
Binary file not shown.
@@ -0,0 +1 @@
|
||||
7f4b213b428f4c013f19137338418ee1f5525793
|
||||
@@ -0,0 +1,8 @@
|
||||
D:\荷城工业\研究项目\1-旗舰级\东方同人TH2020\工程\源代码\Demo\Threding Demo2\bin\Debug\Threding Demo2.exe.config
|
||||
D:\荷城工业\研究项目\1-旗舰级\东方同人TH2020\工程\源代码\Demo\Threding Demo2\bin\Debug\Threding Demo2.exe
|
||||
D:\荷城工业\研究项目\1-旗舰级\东方同人TH2020\工程\源代码\Demo\Threding Demo2\bin\Debug\Threding Demo2.pdb
|
||||
D:\荷城工业\研究项目\1-旗舰级\东方同人TH2020\工程\源代码\Demo\Threding Demo2\obj\Debug\Threding Demo2.csproj.AssemblyReference.cache
|
||||
D:\荷城工业\研究项目\1-旗舰级\东方同人TH2020\工程\源代码\Demo\Threding Demo2\obj\Debug\Threding Demo2.csproj.CoreCompileInputs.cache
|
||||
D:\荷城工业\研究项目\1-旗舰级\东方同人TH2020\工程\源代码\Demo\Threding Demo2\obj\Debug\Threding Demo2.exe
|
||||
D:\荷城工业\研究项目\1-旗舰级\东方同人TH2020\工程\源代码\Demo\Threding Demo2\obj\Debug\Threding Demo2.pdb
|
||||
D:\荷城工业\研究项目\1-旗舰级\东方同人TH2020\工程\源代码\Demo\Threding Demo2\obj\Debug\Threding Demo2.csproj.SuggestedBindingRedirects.cache
|
||||
Binary file not shown.
Binary file not shown.
Reference in New Issue
Block a user